Imported Upstream version 4.5.2
[platform/upstream/python-lxml.git] / src / lxml / objectify.c
1 /* Generated by Cython 0.29.21 */
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_21"
79 #define CYTHON_HEX_VERSION 0x001D15F0
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   #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
507   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
508   #else
509   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
510   #endif
511 #else
512   #define CYTHON_PEP393_ENABLED 0
513   #define PyUnicode_1BYTE_KIND  1
514   #define PyUnicode_2BYTE_KIND  2
515   #define PyUnicode_4BYTE_KIND  4
516   #define __Pyx_PyUnicode_READY(op)       (0)
517   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
518   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
519   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
520   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
521   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
522   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
523   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
524   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
525 #endif
526 #if CYTHON_COMPILING_IN_PYPY
527   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
528   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
529 #else
530   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
531   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
532       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
533 #endif
534 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
535   #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
536 #endif
537 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
538   #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
539 #endif
540 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
541   #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
542 #endif
543 #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))
544 #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
545 #if PY_MAJOR_VERSION >= 3
546   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
547 #else
548   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
549 #endif
550 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
551   #define PyObject_ASCII(o)            PyObject_Repr(o)
552 #endif
553 #if PY_MAJOR_VERSION >= 3
554   #define PyBaseString_Type            PyUnicode_Type
555   #define PyStringObject               PyUnicodeObject
556   #define PyString_Type                PyUnicode_Type
557   #define PyString_Check               PyUnicode_Check
558   #define PyString_CheckExact          PyUnicode_CheckExact
559 #ifndef PyObject_Unicode
560   #define PyObject_Unicode             PyObject_Str
561 #endif
562 #endif
563 #if PY_MAJOR_VERSION >= 3
564   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
565   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
566 #else
567   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
568   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
569 #endif
570 #ifndef PySet_CheckExact
571   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
572 #endif
573 #if PY_VERSION_HEX >= 0x030900A4
574   #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
575   #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
576 #else
577   #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
578   #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
579 #endif
580 #if CYTHON_ASSUME_SAFE_MACROS
581   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
582 #else
583   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
584 #endif
585 #if PY_MAJOR_VERSION >= 3
586   #define PyIntObject                  PyLongObject
587   #define PyInt_Type                   PyLong_Type
588   #define PyInt_Check(op)              PyLong_Check(op)
589   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
590   #define PyInt_FromString             PyLong_FromString
591   #define PyInt_FromUnicode            PyLong_FromUnicode
592   #define PyInt_FromLong               PyLong_FromLong
593   #define PyInt_FromSize_t             PyLong_FromSize_t
594   #define PyInt_FromSsize_t            PyLong_FromSsize_t
595   #define PyInt_AsLong                 PyLong_AsLong
596   #define PyInt_AS_LONG                PyLong_AS_LONG
597   #define PyInt_AsSsize_t              PyLong_AsSsize_t
598   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
599   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
600   #define PyNumber_Int                 PyNumber_Long
601 #endif
602 #if PY_MAJOR_VERSION >= 3
603   #define PyBoolObject                 PyLongObject
604 #endif
605 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
606   #ifndef PyUnicode_InternFromString
607     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
608   #endif
609 #endif
610 #if PY_VERSION_HEX < 0x030200A4
611   typedef long Py_hash_t;
612   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
613   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
614 #else
615   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
616   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
617 #endif
618 #if PY_MAJOR_VERSION >= 3
619   #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
620 #else
621   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
622 #endif
623 #if CYTHON_USE_ASYNC_SLOTS
624   #if PY_VERSION_HEX >= 0x030500B1
625     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
626     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
627   #else
628     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
629   #endif
630 #else
631   #define __Pyx_PyType_AsAsync(obj) NULL
632 #endif
633 #ifndef __Pyx_PyAsyncMethodsStruct
634     typedef struct {
635         unaryfunc am_await;
636         unaryfunc am_aiter;
637         unaryfunc am_anext;
638     } __Pyx_PyAsyncMethodsStruct;
639 #endif
640
641 #if defined(WIN32) || defined(MS_WINDOWS)
642   #define _USE_MATH_DEFINES
643 #endif
644 #include <math.h>
645 #ifdef NAN
646 #define __PYX_NAN() ((float) NAN)
647 #else
648 static CYTHON_INLINE float __PYX_NAN() {
649   float value;
650   memset(&value, 0xFF, sizeof(value));
651   return value;
652 }
653 #endif
654 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
655 #define __Pyx_truncl trunc
656 #else
657 #define __Pyx_truncl truncl
658 #endif
659
660 #define __PYX_MARK_ERR_POS(f_index, lineno) \
661     { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
662 #define __PYX_ERR(f_index, lineno, Ln_error) \
663     { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
664
665 #ifndef __PYX_EXTERN_C
666   #ifdef __cplusplus
667     #define __PYX_EXTERN_C extern "C"
668   #else
669     #define __PYX_EXTERN_C extern
670   #endif
671 #endif
672
673 #define __PYX_HAVE__lxml__objectify
674 #define __PYX_HAVE_API__lxml__objectify
675 /* Early includes */
676 #include <string.h>
677 #include <stdio.h>
678 #include "lxml-version.h"
679 #include "libxml/xmlversion.h"
680 #include "libxml/xmlstring.h"
681 #include "libxml/encoding.h"
682 #include "libxml/chvalid.h"
683 #include "libxml/hash.h"
684 #include "libxml/tree.h"
685 #include "libxml/uri.h"
686 #include "libxml/HTMLtree.h"
687 #include "libxml/valid.h"
688 #include "libxml/xmlIO.h"
689 #include "libxml/xmlsave.h"
690 #include "libxml/globals.h"
691 #include "libxml/xmlmemory.h"
692 #include "etree_defs.h"
693 #include "etree_api.h"
694 #include "pythread.h"
695 #include "includes/etree_defs.h"
696 #include "lxml_endian.h"
697 #ifdef _OPENMP
698 #include <omp.h>
699 #endif /* _OPENMP */
700
701 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
702 #define CYTHON_WITHOUT_ASSERTIONS
703 #endif
704
705 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
706                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
707
708 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
709 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
710 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
711 #define __PYX_DEFAULT_STRING_ENCODING ""
712 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
713 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
714 #define __Pyx_uchar_cast(c) ((unsigned char)c)
715 #define __Pyx_long_cast(x) ((long)x)
716 #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
717     (sizeof(type) < sizeof(Py_ssize_t))  ||\
718     (sizeof(type) > sizeof(Py_ssize_t) &&\
719           likely(v < (type)PY_SSIZE_T_MAX ||\
720                  v == (type)PY_SSIZE_T_MAX)  &&\
721           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
722                                 v == (type)PY_SSIZE_T_MIN)))  ||\
723     (sizeof(type) == sizeof(Py_ssize_t) &&\
724           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
725                                v == (type)PY_SSIZE_T_MAX)))  )
726 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
727     return (size_t) i < (size_t) limit;
728 }
729 #if defined (__cplusplus) && __cplusplus >= 201103L
730     #include <cstdlib>
731     #define __Pyx_sst_abs(value) std::abs(value)
732 #elif SIZEOF_INT >= SIZEOF_SIZE_T
733     #define __Pyx_sst_abs(value) abs(value)
734 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
735     #define __Pyx_sst_abs(value) labs(value)
736 #elif defined (_MSC_VER)
737     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
738 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
739     #define __Pyx_sst_abs(value) llabs(value)
740 #elif defined (__GNUC__)
741     #define __Pyx_sst_abs(value) __builtin_llabs(value)
742 #else
743     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
744 #endif
745 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
746 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
747 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
748 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
749 #define __Pyx_PyBytes_FromString        PyBytes_FromString
750 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
751 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
752 #if PY_MAJOR_VERSION < 3
753     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
754     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
755 #else
756     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
757     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
758 #endif
759 #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
760 #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
761 #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
762 #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
763 #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
764 #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
765 #define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
766 #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
767 #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
768 #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
769 #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
770 #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
771 #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
772 #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
773 #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
774 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
775 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
776     const Py_UNICODE *u_end = u;
777     while (*u_end++) ;
778     return (size_t)(u_end - u - 1);
779 }
780 #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
781 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
782 #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
783 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
784 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
785 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
786 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
787 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
788 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
789 #define __Pyx_PySequence_Tuple(obj)\
790     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
791 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
792 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
793 #if CYTHON_ASSUME_SAFE_MACROS
794 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
795 #else
796 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
797 #endif
798 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
799 #if PY_MAJOR_VERSION >= 3
800 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
801 #else
802 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
803 #endif
804 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
805 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
806 static int __Pyx_sys_getdefaultencoding_not_ascii;
807 static int __Pyx_init_sys_getdefaultencoding_params(void) {
808     PyObject* sys;
809     PyObject* default_encoding = NULL;
810     PyObject* ascii_chars_u = NULL;
811     PyObject* ascii_chars_b = NULL;
812     const char* default_encoding_c;
813     sys = PyImport_ImportModule("sys");
814     if (!sys) goto bad;
815     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
816     Py_DECREF(sys);
817     if (!default_encoding) goto bad;
818     default_encoding_c = PyBytes_AsString(default_encoding);
819     if (!default_encoding_c) goto bad;
820     if (strcmp(default_encoding_c, "ascii") == 0) {
821         __Pyx_sys_getdefaultencoding_not_ascii = 0;
822     } else {
823         char ascii_chars[128];
824         int c;
825         for (c = 0; c < 128; c++) {
826             ascii_chars[c] = c;
827         }
828         __Pyx_sys_getdefaultencoding_not_ascii = 1;
829         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
830         if (!ascii_chars_u) goto bad;
831         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
832         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
833             PyErr_Format(
834                 PyExc_ValueError,
835                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
836                 default_encoding_c);
837             goto bad;
838         }
839         Py_DECREF(ascii_chars_u);
840         Py_DECREF(ascii_chars_b);
841     }
842     Py_DECREF(default_encoding);
843     return 0;
844 bad:
845     Py_XDECREF(default_encoding);
846     Py_XDECREF(ascii_chars_u);
847     Py_XDECREF(ascii_chars_b);
848     return -1;
849 }
850 #endif
851 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
852 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
853 #else
854 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
855 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
856 static char* __PYX_DEFAULT_STRING_ENCODING;
857 static int __Pyx_init_sys_getdefaultencoding_params(void) {
858     PyObject* sys;
859     PyObject* default_encoding = NULL;
860     char* default_encoding_c;
861     sys = PyImport_ImportModule("sys");
862     if (!sys) goto bad;
863     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
864     Py_DECREF(sys);
865     if (!default_encoding) goto bad;
866     default_encoding_c = PyBytes_AsString(default_encoding);
867     if (!default_encoding_c) goto bad;
868     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
869     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
870     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
871     Py_DECREF(default_encoding);
872     return 0;
873 bad:
874     Py_XDECREF(default_encoding);
875     return -1;
876 }
877 #endif
878 #endif
879
880
881 /* Test for GCC > 2.95 */
882 #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
883   #define likely(x)   __builtin_expect(!!(x), 1)
884   #define unlikely(x) __builtin_expect(!!(x), 0)
885 #else /* !__GNUC__ or GCC < 2.95 */
886   #define likely(x)   (x)
887   #define unlikely(x) (x)
888 #endif /* __GNUC__ */
889 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
890
891 static PyObject *__pyx_m = NULL;
892 static PyObject *__pyx_d;
893 static PyObject *__pyx_b;
894 static PyObject *__pyx_cython_runtime = NULL;
895 static PyObject *__pyx_empty_tuple;
896 static PyObject *__pyx_empty_bytes;
897 static PyObject *__pyx_empty_unicode;
898 static int __pyx_lineno;
899 static int __pyx_clineno = 0;
900 static const char * __pyx_cfilenm= __FILE__;
901 static const char *__pyx_filename;
902
903
904 static const char *__pyx_f[] = {
905   "src/lxml/objectify.pyx",
906   "src/lxml/objectpath.pxi",
907   "src/lxml/includes/etreepublic.pxd",
908 };
909
910 /*--- Type declarations ---*/
911 struct __pyx_obj_4lxml_9objectify_ObjectifiedElement;
912 struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement;
913 struct __pyx_obj_4lxml_9objectify_NumberElement;
914 struct __pyx_obj_4lxml_9objectify_IntElement;
915 struct __pyx_obj_4lxml_9objectify_LongElement;
916 struct __pyx_obj_4lxml_9objectify_FloatElement;
917 struct __pyx_obj_4lxml_9objectify_StringElement;
918 struct __pyx_obj_4lxml_9objectify_NoneElement;
919 struct __pyx_obj_4lxml_9objectify_BoolElement;
920 struct __pyx_obj_4lxml_9objectify_PyType;
921 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller;
922 struct __pyx_obj_4lxml_9objectify_ElementMaker;
923 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup;
924 struct __pyx_obj_4lxml_9objectify_ObjectPath;
925 struct __pyx_t_4lxml_9objectify__ObjectPath;
926 typedef struct __pyx_t_4lxml_9objectify__ObjectPath __pyx_t_4lxml_9objectify__ObjectPath;
927
928 /* "src/lxml/objectpath.pxi":4
929  * # ObjectPath
930  * 
931  * ctypedef struct _ObjectPath:             # <<<<<<<<<<<<<<
932  *     const_xmlChar* href
933  *     const_xmlChar* name
934  */
935 struct __pyx_t_4lxml_9objectify__ObjectPath {
936   const xmlChar *href;
937   const xmlChar *name;
938   Py_ssize_t index;
939 };
940
941 /* "lxml/objectify.pyx":133
942  * # Element class for the main API
943  * 
944  * cdef class ObjectifiedElement(ElementBase):             # <<<<<<<<<<<<<<
945  *     u"""Main XML Element class.
946  * 
947  */
948 struct __pyx_obj_4lxml_9objectify_ObjectifiedElement {
949   struct LxmlElementBase __pyx_base;
950 };
951
952
953 /* "lxml/objectify.pyx":592
954  * # Data type support in subclasses
955  * 
956  * cdef class ObjectifiedDataElement(ObjectifiedElement):             # <<<<<<<<<<<<<<
957  *     u"""This is the base class for all data type Elements.  Subclasses should
958  *     override the 'pyval' property and possibly the __str__ method.
959  */
960 struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement {
961   struct __pyx_obj_4lxml_9objectify_ObjectifiedElement __pyx_base;
962 };
963
964
965 /* "lxml/objectify.pyx":612
966  *         cetree.setNodeText(self._c_node, s)
967  * 
968  * cdef class NumberElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
969  *     cdef object _parse_value
970  *     def _setValueParser(self, function):
971  */
972 struct __pyx_obj_4lxml_9objectify_NumberElement {
973   struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
974   PyObject *_parse_value;
975 };
976
977
978 /* "lxml/objectify.pyx":709
979  *         return _numericValueOf(self) ^ _numericValueOf(other)
980  * 
981  * cdef class IntElement(NumberElement):             # <<<<<<<<<<<<<<
982  *     def _init(self):
983  *         self._parse_value = int
984  */
985 struct __pyx_obj_4lxml_9objectify_IntElement {
986   struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
987 };
988
989
990 /* "lxml/objectify.pyx":716
991  *         return int(_parseNumber(self))
992  * 
993  * cdef class LongElement(NumberElement):             # <<<<<<<<<<<<<<
994  *     def _init(self):
995  *         self._parse_value = long
996  */
997 struct __pyx_obj_4lxml_9objectify_LongElement {
998   struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
999 };
1000
1001
1002 /* "lxml/objectify.pyx":723
1003  *         return int(_parseNumber(self))
1004  * 
1005  * cdef class FloatElement(NumberElement):             # <<<<<<<<<<<<<<
1006  *     def _init(self):
1007  *         self._parse_value = float
1008  */
1009 struct __pyx_obj_4lxml_9objectify_FloatElement {
1010   struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
1011 };
1012
1013
1014 /* "lxml/objectify.pyx":727
1015  *         self._parse_value = float
1016  * 
1017  * cdef class StringElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
1018  *     u"""String data class.
1019  * 
1020  */
1021 struct __pyx_obj_4lxml_9objectify_StringElement {
1022   struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
1023 };
1024
1025
1026 /* "lxml/objectify.pyx":789
1027  *         return complex(textOf(self._c_node))
1028  * 
1029  * cdef class NoneElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
1030  *     def __str__(self):
1031  *         return u"None"
1032  */
1033 struct __pyx_obj_4lxml_9objectify_NoneElement {
1034   struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
1035 };
1036
1037
1038 /* "lxml/objectify.pyx":815
1039  * 
1040  * 
1041  * cdef class BoolElement(IntElement):             # <<<<<<<<<<<<<<
1042  *     u"""Boolean type base on string values: 'true' or 'false'.
1043  * 
1044  */
1045 struct __pyx_obj_4lxml_9objectify_BoolElement {
1046   struct __pyx_obj_4lxml_9objectify_IntElement __pyx_base;
1047 };
1048
1049
1050 /* "lxml/objectify.pyx":901
1051  * # Python type registry
1052  * 
1053  * cdef class PyType:             # <<<<<<<<<<<<<<
1054  *     u"""PyType(self, name, type_check, type_class, stringify=None)
1055  *     User defined type.
1056  */
1057 struct __pyx_obj_4lxml_9objectify_PyType {
1058   PyObject_HEAD
1059   PyObject *name;
1060   PyObject *type_check;
1061   PyObject *stringify;
1062   PyObject *_type;
1063   PyObject *_schema_types;
1064 };
1065
1066
1067 /* "lxml/objectify.pyx":1131
1068  * @cython.final
1069  * @cython.internal
1070  * cdef class _ObjectifyElementMakerCaller:             # <<<<<<<<<<<<<<
1071  *     cdef object _tag
1072  *     cdef object _nsmap
1073  */
1074 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller {
1075   PyObject_HEAD
1076   PyObject *_tag;
1077   PyObject *_nsmap;
1078   PyObject *_element_factory;
1079   int _annotate;
1080 };
1081
1082
1083 /* "lxml/objectify.pyx":1221
1084  *         cetree.setNodeText(elem._c_node, text)
1085  * 
1086  * cdef class ElementMaker:             # <<<<<<<<<<<<<<
1087  *     u"""ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)
1088  * 
1089  */
1090 struct __pyx_obj_4lxml_9objectify_ElementMaker {
1091   PyObject_HEAD
1092   struct __pyx_vtabstruct_4lxml_9objectify_ElementMaker *__pyx_vtab;
1093   PyObject *_makeelement;
1094   PyObject *_namespace;
1095   PyObject *_nsmap;
1096   int _annotate;
1097   PyObject *_cache;
1098 };
1099
1100
1101 /* "lxml/objectify.pyx":1377
1102  * # Element class lookup
1103  * 
1104  * cdef class ObjectifyElementClassLookup(ElementClassLookup):             # <<<<<<<<<<<<<<
1105  *     u"""ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)
1106  *     Element class lookup method that uses the objectify classes.
1107  */
1108 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup {
1109   struct LxmlElementClassLookup __pyx_base;
1110   PyObject *empty_data_class;
1111   PyObject *tree_class;
1112 };
1113
1114
1115 /* "src/lxml/objectpath.pxi":13
1116  * 
1117  * 
1118  * cdef class ObjectPath:             # <<<<<<<<<<<<<<
1119  *     u"""ObjectPath(path)
1120  *     Immutable object that represents a compiled object path.
1121  */
1122 struct __pyx_obj_4lxml_9objectify_ObjectPath {
1123   PyObject_HEAD
1124   PyObject *find;
1125   PyObject *_path;
1126   PyObject *_path_str;
1127   __pyx_t_4lxml_9objectify__ObjectPath *_c_path;
1128   Py_ssize_t _path_len;
1129 };
1130
1131
1132
1133 /* "lxml/objectify.pyx":1221
1134  *         cetree.setNodeText(elem._c_node, text)
1135  * 
1136  * cdef class ElementMaker:             # <<<<<<<<<<<<<<
1137  *     u"""ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)
1138  * 
1139  */
1140
1141 struct __pyx_vtabstruct_4lxml_9objectify_ElementMaker {
1142   PyObject *(*_build_element_maker)(struct __pyx_obj_4lxml_9objectify_ElementMaker *, PyObject *, int);
1143 };
1144 static struct __pyx_vtabstruct_4lxml_9objectify_ElementMaker *__pyx_vtabptr_4lxml_9objectify_ElementMaker;
1145 static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(struct __pyx_obj_4lxml_9objectify_ElementMaker *, PyObject *, int);
1146
1147 /* --- Runtime support code (head) --- */
1148 /* Refnanny.proto */
1149 #ifndef CYTHON_REFNANNY
1150   #define CYTHON_REFNANNY 0
1151 #endif
1152 #if CYTHON_REFNANNY
1153   typedef struct {
1154     void (*INCREF)(void*, PyObject*, int);
1155     void (*DECREF)(void*, PyObject*, int);
1156     void (*GOTREF)(void*, PyObject*, int);
1157     void (*GIVEREF)(void*, PyObject*, int);
1158     void* (*SetupContext)(const char*, int, const char*);
1159     void (*FinishContext)(void**);
1160   } __Pyx_RefNannyAPIStruct;
1161   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1162   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1163   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1164 #ifdef WITH_THREAD
1165   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1166           if (acquire_gil) {\
1167               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1168               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1169               PyGILState_Release(__pyx_gilstate_save);\
1170           } else {\
1171               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1172           }
1173 #else
1174   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1175           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1176 #endif
1177   #define __Pyx_RefNannyFinishContext()\
1178           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1179   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1180   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1181   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1182   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1183   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1184   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1185   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1186   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1187 #else
1188   #define __Pyx_RefNannyDeclarations
1189   #define __Pyx_RefNannySetupContext(name, acquire_gil)
1190   #define __Pyx_RefNannyFinishContext()
1191   #define __Pyx_INCREF(r) Py_INCREF(r)
1192   #define __Pyx_DECREF(r) Py_DECREF(r)
1193   #define __Pyx_GOTREF(r)
1194   #define __Pyx_GIVEREF(r)
1195   #define __Pyx_XINCREF(r) Py_XINCREF(r)
1196   #define __Pyx_XDECREF(r) Py_XDECREF(r)
1197   #define __Pyx_XGOTREF(r)
1198   #define __Pyx_XGIVEREF(r)
1199 #endif
1200 #define __Pyx_XDECREF_SET(r, v) do {\
1201         PyObject *tmp = (PyObject *) r;\
1202         r = v; __Pyx_XDECREF(tmp);\
1203     } while (0)
1204 #define __Pyx_DECREF_SET(r, v) do {\
1205         PyObject *tmp = (PyObject *) r;\
1206         r = v; __Pyx_DECREF(tmp);\
1207     } while (0)
1208 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1209 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1210
1211 /* PyObjectGetAttrStr.proto */
1212 #if CYTHON_USE_TYPE_SLOTS
1213 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1214 #else
1215 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1216 #endif
1217
1218 /* GetBuiltinName.proto */
1219 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1220
1221 /* PyCFunctionFastCall.proto */
1222 #if CYTHON_FAST_PYCCALL
1223 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1224 #else
1225 #define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
1226 #endif
1227
1228 /* PyFunctionFastCall.proto */
1229 #if CYTHON_FAST_PYCALL
1230 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1231     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1232 #if 1 || PY_VERSION_HEX < 0x030600B1
1233 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1234 #else
1235 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1236 #endif
1237 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1238     (sizeof(char [1 - 2*!(cond)]) - 1)
1239 #ifndef Py_MEMBER_SIZE
1240 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1241 #endif
1242   static size_t __pyx_pyframe_localsplus_offset = 0;
1243   #include "frameobject.h"
1244   #define __Pxy_PyFrame_Initialize_Offsets()\
1245     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1246      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1247   #define __Pyx_PyFrame_GetLocalsplus(frame)\
1248     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1249 #endif
1250
1251 /* PyObjectCall.proto */
1252 #if CYTHON_COMPILING_IN_CPYTHON
1253 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1254 #else
1255 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1256 #endif
1257
1258 /* PyObjectCall2Args.proto */
1259 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1260
1261 /* PyObjectCallMethO.proto */
1262 #if CYTHON_COMPILING_IN_CPYTHON
1263 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1264 #endif
1265
1266 /* PyObjectCallOneArg.proto */
1267 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1268
1269 /* RaiseDoubleKeywords.proto */
1270 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1271
1272 /* ParseKeywords.proto */
1273 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1274     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1275     const char* function_name);
1276
1277 /* RaiseArgTupleInvalid.proto */
1278 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1279     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1280
1281 /* RaiseTooManyValuesToUnpack.proto */
1282 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1283
1284 /* RaiseNeedMoreValuesToUnpack.proto */
1285 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1286
1287 /* RaiseNoneIterError.proto */
1288 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1289
1290 /* decode_c_string_utf16.proto */
1291 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1292     int byteorder = 0;
1293     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1294 }
1295 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1296     int byteorder = -1;
1297     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1298 }
1299 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1300     int byteorder = 1;
1301     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1302 }
1303
1304 /* decode_c_bytes.proto */
1305 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
1306          const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
1307          const char* encoding, const char* errors,
1308          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1309
1310 /* decode_bytes.proto */
1311 static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
1312          PyObject* string, Py_ssize_t start, Py_ssize_t stop,
1313          const char* encoding, const char* errors,
1314          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
1315     return __Pyx_decode_c_bytes(
1316         PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string),
1317         start, stop, encoding, errors, decode_func);
1318 }
1319
1320 /* PyObjectCallNoArg.proto */
1321 #if CYTHON_COMPILING_IN_CPYTHON
1322 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1323 #else
1324 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1325 #endif
1326
1327 /* PyDictVersioning.proto */
1328 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1329 #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
1330 #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
1331 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1332     (version_var) = __PYX_GET_DICT_VERSION(dict);\
1333     (cache_var) = (value);
1334 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1335     static PY_UINT64_T __pyx_dict_version = 0;\
1336     static PyObject *__pyx_dict_cached_value = NULL;\
1337     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1338         (VAR) = __pyx_dict_cached_value;\
1339     } else {\
1340         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1341         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1342     }\
1343 }
1344 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1345 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1346 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1347 #else
1348 #define __PYX_GET_DICT_VERSION(dict)  (0)
1349 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1350 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
1351 #endif
1352
1353 /* GetModuleGlobalName.proto */
1354 #if CYTHON_USE_DICT_VERSIONS
1355 #define __Pyx_GetModuleGlobalName(var, name)  {\
1356     static PY_UINT64_T __pyx_dict_version = 0;\
1357     static PyObject *__pyx_dict_cached_value = NULL;\
1358     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1359         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1360         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1361 }
1362 #define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
1363     PY_UINT64_T __pyx_dict_version;\
1364     PyObject *__pyx_dict_cached_value;\
1365     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1366 }
1367 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1368 #else
1369 #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
1370 #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
1371 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1372 #endif
1373
1374 /* ExtTypeTest.proto */
1375 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1376
1377 /* PyDictContains.proto */
1378 static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
1379     int result = PyDict_Contains(dict, item);
1380     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1381 }
1382
1383 /* ListAppend.proto */
1384 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1385 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1386     PyListObject* L = (PyListObject*) list;
1387     Py_ssize_t len = Py_SIZE(list);
1388     if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1389         Py_INCREF(x);
1390         PyList_SET_ITEM(list, len, x);
1391         __Pyx_SET_SIZE(list, len + 1);
1392         return 0;
1393     }
1394     return PyList_Append(list, x);
1395 }
1396 #else
1397 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1398 #endif
1399
1400 /* IncludeStringH.proto */
1401 #include <string.h>
1402
1403 /* BytesEquals.proto */
1404 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1405
1406 /* UnicodeEquals.proto */
1407 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1408
1409 /* PyObjectFormatSimple.proto */
1410 #if CYTHON_COMPILING_IN_PYPY
1411     #define __Pyx_PyObject_FormatSimple(s, f) (\
1412         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1413         PyObject_Format(s, f))
1414 #elif PY_MAJOR_VERSION < 3
1415     #define __Pyx_PyObject_FormatSimple(s, f) (\
1416         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1417         likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
1418         PyObject_Format(s, f))
1419 #elif CYTHON_USE_TYPE_SLOTS
1420     #define __Pyx_PyObject_FormatSimple(s, f) (\
1421         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1422         likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) :\
1423         likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) :\
1424         PyObject_Format(s, f))
1425 #else
1426     #define __Pyx_PyObject_FormatSimple(s, f) (\
1427         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1428         PyObject_Format(s, f))
1429 #endif
1430
1431 /* JoinPyUnicode.proto */
1432 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
1433                                       Py_UCS4 max_char);
1434
1435 /* PyThreadStateGet.proto */
1436 #if CYTHON_FAST_THREAD_STATE
1437 #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
1438 #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
1439 #define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
1440 #else
1441 #define __Pyx_PyThreadState_declare
1442 #define __Pyx_PyThreadState_assign
1443 #define __Pyx_PyErr_Occurred()  PyErr_Occurred()
1444 #endif
1445
1446 /* PyErrFetchRestore.proto */
1447 #if CYTHON_FAST_THREAD_STATE
1448 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1449 #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1450 #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1451 #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1452 #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1453 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1454 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1455 #if CYTHON_COMPILING_IN_CPYTHON
1456 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1457 #else
1458 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1459 #endif
1460 #else
1461 #define __Pyx_PyErr_Clear() PyErr_Clear()
1462 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1463 #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
1464 #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
1465 #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
1466 #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
1467 #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
1468 #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
1469 #endif
1470
1471 /* RaiseException.proto */
1472 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1473
1474 /* GetItemInt.proto */
1475 #define __Pyx_GetItemInt(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_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1478     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1479                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1480 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1481     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1482     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1483     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1484 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1485                                                               int wraparound, int boundscheck);
1486 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1487     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1488     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1489     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1490 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1491                                                               int wraparound, int boundscheck);
1492 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1493 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1494                                                      int is_list, int wraparound, int boundscheck);
1495
1496 /* ObjectGetItem.proto */
1497 #if CYTHON_USE_TYPE_SLOTS
1498 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1499 #else
1500 #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
1501 #endif
1502
1503 /* PyObject_Unicode.proto */
1504 #if PY_MAJOR_VERSION >= 3
1505 #define __Pyx_PyObject_Unicode(obj)\
1506     (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
1507 #else
1508 #define __Pyx_PyObject_Unicode(obj)\
1509     (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
1510 #endif
1511
1512 /* PyObjectSetAttrStr.proto */
1513 #if CYTHON_USE_TYPE_SLOTS
1514 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
1515 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
1516 #else
1517 #define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
1518 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
1519 #endif
1520
1521 /* SliceObject.proto */
1522 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
1523     __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
1524 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
1525         PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
1526         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1527         int has_cstart, int has_cstop, int wraparound);
1528
1529 /* dict_getitem_default.proto */
1530 static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);
1531
1532 /* UnpackUnboundCMethod.proto */
1533 typedef struct {
1534     PyObject *type;
1535     PyObject **method_name;
1536     PyCFunction func;
1537     PyObject *method;
1538     int flag;
1539 } __Pyx_CachedCFunction;
1540
1541 /* CallUnboundCMethod1.proto */
1542 static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
1543 #if CYTHON_COMPILING_IN_CPYTHON
1544 static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
1545 #else
1546 #define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
1547 #endif
1548
1549 /* CallUnboundCMethod2.proto */
1550 static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
1551 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
1552 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
1553 #else
1554 #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
1555 #endif
1556
1557 /* BuildPyUnicode.proto */
1558 static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
1559                                                 int prepend_sign, char padding_char);
1560
1561 /* CIntToPyUnicode.proto */
1562 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);
1563
1564 /* PyIntBinop.proto */
1565 #if !CYTHON_COMPILING_IN_PYPY
1566 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1567 #else
1568 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
1569     (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
1570 #endif
1571
1572 /* py_abs.proto */
1573 #if CYTHON_USE_PYLONG_INTERNALS
1574 static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
1575 #define __Pyx_PyNumber_Absolute(x)\
1576     ((likely(PyLong_CheckExact(x))) ?\
1577          (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
1578          PyNumber_Absolute(x))
1579 #else
1580 #define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
1581 #endif
1582
1583 /* StrEquals.proto */
1584 #if PY_MAJOR_VERSION >= 3
1585 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1586 #else
1587 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1588 #endif
1589
1590 /* GetTopmostException.proto */
1591 #if CYTHON_USE_EXC_INFO_STACK
1592 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1593 #endif
1594
1595 /* SaveResetException.proto */
1596 #if CYTHON_FAST_THREAD_STATE
1597 #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1598 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1599 #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1600 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1601 #else
1602 #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
1603 #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
1604 #endif
1605
1606 /* PyErrExceptionMatches.proto */
1607 #if CYTHON_FAST_THREAD_STATE
1608 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1609 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1610 #else
1611 #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
1612 #endif
1613
1614 /* GetAttr.proto */
1615 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1616
1617 /* GetAttr3.proto */
1618 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1619
1620 /* CallableCheck.proto */
1621 #if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3
1622 #define __Pyx_PyCallable_Check(obj)   ((obj)->ob_type->tp_call != NULL)
1623 #else
1624 #define __Pyx_PyCallable_Check(obj)   PyCallable_Check(obj)
1625 #endif
1626
1627 /* IterFinish.proto */
1628 static CYTHON_INLINE int __Pyx_IterFinish(void);
1629
1630 /* UnpackItemEndCheck.proto */
1631 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1632
1633 /* PyIntBinop.proto */
1634 #if !CYTHON_COMPILING_IN_PYPY
1635 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1636 #else
1637 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1638     (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1639 #endif
1640
1641 /* PyIntCompare.proto */
1642 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1643
1644 /* PySequenceContains.proto */
1645 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1646     int result = PySequence_Contains(seq, item);
1647     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1648 }
1649
1650 /* py_dict_items.proto */
1651 static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
1652
1653 /* CallUnboundCMethod0.proto */
1654 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
1655 #if CYTHON_COMPILING_IN_CPYTHON
1656 #define __Pyx_CallUnboundCMethod0(cfunc, self)\
1657     (likely((cfunc)->func) ?\
1658         (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
1659          (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
1660             (PY_VERSION_HEX >= 0x030700A0 ?\
1661                 (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
1662                 (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
1663           (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
1664             (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
1665             (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
1666                ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
1667                __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
1668         __Pyx__CallUnboundCMethod0(cfunc, self))
1669 #else
1670 #define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
1671 #endif
1672
1673 /* pyfrozenset_new.proto */
1674 static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it);
1675
1676 /* PySetContains.proto */
1677 static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq);
1678
1679 /* py_dict_values.proto */
1680 static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
1681
1682 /* KeywordStringCheck.proto */
1683 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1684
1685 /* py_dict_clear.proto */
1686 #define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0)
1687
1688 /* ArgTypeTest.proto */
1689 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1690     ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1691         __Pyx__ArgTypeTest(obj, type, name, exact))
1692 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1693
1694 /* PyUnicode_Unicode.proto */
1695 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);
1696
1697 /* PyObjectFormatAndDecref.proto */
1698 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
1699 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);
1700
1701 /* SliceObject.proto */
1702 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
1703         PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
1704         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1705         int has_cstart, int has_cstop, int wraparound);
1706
1707 /* Import.proto */
1708 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1709
1710 /* GetException.proto */
1711 #if CYTHON_FAST_THREAD_STATE
1712 #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
1713 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1714 #else
1715 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1716 #endif
1717
1718 /* PyIntCompare.proto */
1719 static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1720
1721 /* DelItemInt.proto */
1722 #define __Pyx_DelItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1723     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1724     __Pyx_DelItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound) :\
1725     (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1726                __Pyx_DelItem_Generic(o, to_py_func(i))))
1727 static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j);
1728 static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
1729                                                int is_list, int wraparound);
1730
1731 /* CallNextTpDealloc.proto */
1732 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
1733
1734 /* CallNextTpTraverse.proto */
1735 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
1736
1737 /* CallNextTpClear.proto */
1738 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);
1739
1740 /* PyObject_GenericGetAttrNoDict.proto */
1741 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1742 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1743 #else
1744 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1745 #endif
1746
1747 /* PyObject_GenericGetAttr.proto */
1748 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1749 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1750 #else
1751 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1752 #endif
1753
1754 /* TypeImport.proto */
1755 #ifndef __PYX_HAVE_RT_ImportType_proto
1756 #define __PYX_HAVE_RT_ImportType_proto
1757 enum __Pyx_ImportType_CheckSize {
1758    __Pyx_ImportType_CheckSize_Error = 0,
1759    __Pyx_ImportType_CheckSize_Warn = 1,
1760    __Pyx_ImportType_CheckSize_Ignore = 2
1761 };
1762 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1763 #endif
1764
1765 /* SetVTable.proto */
1766 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1767
1768 /* ImportFrom.proto */
1769 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1770
1771 /* FetchCommonType.proto */
1772 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1773
1774 /* CythonFunctionShared.proto */
1775 #define __Pyx_CyFunction_USED 1
1776 #define __Pyx_CYFUNCTION_STATICMETHOD  0x01
1777 #define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
1778 #define __Pyx_CYFUNCTION_CCLASS        0x04
1779 #define __Pyx_CyFunction_GetClosure(f)\
1780     (((__pyx_CyFunctionObject *) (f))->func_closure)
1781 #define __Pyx_CyFunction_GetClassObj(f)\
1782     (((__pyx_CyFunctionObject *) (f))->func_classobj)
1783 #define __Pyx_CyFunction_Defaults(type, f)\
1784     ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
1785 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
1786     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
1787 typedef struct {
1788     PyCFunctionObject func;
1789 #if PY_VERSION_HEX < 0x030500A0
1790     PyObject *func_weakreflist;
1791 #endif
1792     PyObject *func_dict;
1793     PyObject *func_name;
1794     PyObject *func_qualname;
1795     PyObject *func_doc;
1796     PyObject *func_globals;
1797     PyObject *func_code;
1798     PyObject *func_closure;
1799     PyObject *func_classobj;
1800     void *defaults;
1801     int defaults_pyobjects;
1802     size_t defaults_size;  // used by FusedFunction for copying defaults
1803     int flags;
1804     PyObject *defaults_tuple;
1805     PyObject *defaults_kwdict;
1806     PyObject *(*defaults_getter)(PyObject *);
1807     PyObject *func_annotations;
1808 } __pyx_CyFunctionObject;
1809 static PyTypeObject *__pyx_CyFunctionType = 0;
1810 #define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
1811 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
1812                                       int flags, PyObject* qualname,
1813                                       PyObject *self,
1814                                       PyObject *module, PyObject *globals,
1815                                       PyObject* code);
1816 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
1817                                                          size_t size,
1818                                                          int pyobjects);
1819 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
1820                                                             PyObject *tuple);
1821 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
1822                                                              PyObject *dict);
1823 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
1824                                                               PyObject *dict);
1825 static int __pyx_CyFunction_init(void);
1826
1827 /* CythonFunction.proto */
1828 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
1829                                       int flags, PyObject* qualname,
1830                                       PyObject *closure,
1831                                       PyObject *module, PyObject *globals,
1832                                       PyObject* code);
1833
1834 /* RegisterModuleCleanup.proto */
1835 static void __pyx_module_cleanup(PyObject *self);
1836 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
1837 static int __Pyx_RegisterCleanup(void);
1838 #else
1839 #define __Pyx_RegisterCleanup() (0)
1840 #endif
1841
1842 /* CLineInTraceback.proto */
1843 #ifdef CYTHON_CLINE_IN_TRACEBACK
1844 #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1845 #else
1846 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1847 #endif
1848
1849 /* CodeObjectCache.proto */
1850 typedef struct {
1851     PyCodeObject* code_object;
1852     int code_line;
1853 } __Pyx_CodeObjectCacheEntry;
1854 struct __Pyx_CodeObjectCache {
1855     int count;
1856     int max_count;
1857     __Pyx_CodeObjectCacheEntry* entries;
1858 };
1859 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1860 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1861 static PyCodeObject *__pyx_find_code_object(int code_line);
1862 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1863
1864 /* AddTraceback.proto */
1865 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1866                                int py_line, const char *filename);
1867
1868 /* CIntToPy.proto */
1869 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1870
1871 /* CIntToPy.proto */
1872 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1873
1874 /* CIntFromPy.proto */
1875 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1876
1877 /* CIntFromPy.proto */
1878 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1879
1880 /* FastTypeChecks.proto */
1881 #if CYTHON_COMPILING_IN_CPYTHON
1882 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1883 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1884 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1885 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1886 #else
1887 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1888 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1889 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1890 #endif
1891 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1892
1893 /* CheckBinaryVersion.proto */
1894 static int __Pyx_check_binary_version(void);
1895
1896 /* InitStrings.proto */
1897 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1898
1899 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*/
1900
1901 /* Module declarations from 'cython' */
1902
1903 /* Module declarations from 'libc.string' */
1904
1905 /* Module declarations from 'libc' */
1906
1907 /* Module declarations from 'libc.stdio' */
1908
1909 /* Module declarations from 'lxml.includes.tree' */
1910
1911 /* Module declarations from 'lxml.etree' */
1912
1913 /* Module declarations from 'lxml.includes' */
1914
1915 /* Module declarations from 'lxml.includes.etreepublic' */
1916 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__Document = 0;
1917 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__Element = 0;
1918 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase = 0;
1919 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__ElementTree = 0;
1920 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup = 0;
1921 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup = 0;
1922 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher = 0;
1923 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator = 0;
1924
1925 /* Module declarations from 'lxml' */
1926
1927 /* Module declarations from 'lxml.python' */
1928
1929 /* Module declarations from 'lxml.objectify' */
1930 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedElement = 0;
1931 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = 0;
1932 static PyTypeObject *__pyx_ptype_4lxml_9objectify_NumberElement = 0;
1933 static PyTypeObject *__pyx_ptype_4lxml_9objectify_IntElement = 0;
1934 static PyTypeObject *__pyx_ptype_4lxml_9objectify_LongElement = 0;
1935 static PyTypeObject *__pyx_ptype_4lxml_9objectify_FloatElement = 0;
1936 static PyTypeObject *__pyx_ptype_4lxml_9objectify_StringElement = 0;
1937 static PyTypeObject *__pyx_ptype_4lxml_9objectify_NoneElement = 0;
1938 static PyTypeObject *__pyx_ptype_4lxml_9objectify_BoolElement = 0;
1939 static PyTypeObject *__pyx_ptype_4lxml_9objectify_PyType = 0;
1940 static PyTypeObject *__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = 0;
1941 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ElementMaker = 0;
1942 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = 0;
1943 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectPath = 0;
1944 static PyObject *__pyx_v_4lxml_9objectify_etree = 0;
1945 static PyObject *__pyx_v_4lxml_9objectify_re = 0;
1946 static PyObject *__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = 0;
1947 static PyObject *__pyx_v_4lxml_9objectify_is_special_method = 0;
1948 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = 0;
1949 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = 0;
1950 static const xmlChar *__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE;
1951 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = 0;
1952 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = 0;
1953 static const xmlChar *__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME;
1954 static PyObject *__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = 0;
1955 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS = 0;
1956 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = 0;
1957 static const xmlChar *__pyx_v_4lxml_9objectify__XML_SCHEMA_NS;
1958 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = 0;
1959 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = 0;
1960 static const xmlChar *__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS;
1961 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = 0;
1962 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = 0;
1963 static PyObject *__pyx_v_4lxml_9objectify__PYTYPE_DICT = 0;
1964 static PyObject *__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = 0;
1965 static PyObject *__pyx_v_4lxml_9objectify__TYPE_CHECKS = 0;
1966 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_4lxml_9objectify_TREE_PYTYPE = 0;
1967 static int __pyx_v_4lxml_9objectify___RECURSIVE_STR;
1968 static PyObject *__pyx_v_4lxml_9objectify__strip_attributes = 0;
1969 static PyObject *__pyx_v_4lxml_9objectify__cleanup_namespaces = 0;
1970 static PyObject *__pyx_v_4lxml_9objectify___DEFAULT_PARSER = 0;
1971 static PyObject *__pyx_v_4lxml_9objectify_objectify_parser = 0;
1972 static PyObject *__pyx_v_4lxml_9objectify__fromstring = 0;
1973 static PyObject *__pyx_v_4lxml_9objectify__parse = 0;
1974 static PyObject *__pyx_v_4lxml_9objectify__DEFAULT_NSMAP = 0;
1975 static PyObject *__pyx_v_4lxml_9objectify__NO_DEFAULT = 0;
1976 static PyObject *__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = 0;
1977 static PyObject *__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = 0;
1978 static PyObject *__pyx_f_4lxml_9objectify_strrepr(PyObject *); /*proto*/
1979 static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *); /*proto*/
1980 static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *); /*proto*/
1981 static CYTHON_INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *, const xmlChar *, const xmlChar *); /*proto*/
1982 static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *); /*proto*/
1983 static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *, const xmlChar *, const xmlChar *, Py_ssize_t); /*proto*/
1984 static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *, PyObject *); /*proto*/
1985 static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *, PyObject *); /*proto*/
1986 static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *, PyObject *); /*proto*/
1987 static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *, PyObject *); /*proto*/
1988 static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *, PyObject *, PyObject *); /*proto*/
1989 static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *, PyObject *); /*proto*/
1990 static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *, struct LxmlElement *, PyObject *); /*proto*/
1991 static int __pyx_f_4lxml_9objectify___parseBool(PyObject *, int __pyx_skip_dispatch); /*proto*/
1992 static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *); /*proto*/
1993 static PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *); /*proto*/
1994 static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *); /*proto*/
1995 static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *); /*proto*/
1996 static PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *, PyObject *, int); /*proto*/
1997 static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *); /*proto*/
1998 static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void); /*proto*/
1999 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
2000 static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *); /*proto*/
2001 static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *, PyObject *); /*proto*/
2002 static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *, int); /*proto*/
2003 static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *); /*proto*/
2004 static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *, struct LxmlDocument *, xmlNode *); /*proto*/
2005 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
2006 static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *, int, int, int, int, PyObject *, PyObject *); /*proto*/
2007 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*/
2008 static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
2009 static PyObject *__pyx_f_4lxml_9objectify__parse_object_path_string(PyObject *); /*proto*/
2010 static PyObject *__pyx_f_4lxml_9objectify__parse_object_path_list(PyObject *); /*proto*/
2011 static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__build_object_path_segments(PyObject *); /*proto*/
2012 static PyObject *__pyx_f_4lxml_9objectify__find_object_path(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, PyObject *); /*proto*/
2013 static PyObject *__pyx_f_4lxml_9objectify__create_object_path(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, int, PyObject *); /*proto*/
2014 static PyObject *__pyx_f_4lxml_9objectify__build_descendant_paths(xmlNode *, PyObject *); /*proto*/
2015 static int __pyx_f_4lxml_9objectify__recursive_build_descendant_paths(xmlNode *, PyObject *, PyObject *); /*proto*/
2016 #define __Pyx_MODULE_NAME "lxml.objectify"
2017 extern int __pyx_module_is_main_lxml__objectify;
2018 int __pyx_module_is_main_lxml__objectify = 0;
2019
2020 /* Implementation of 'lxml.objectify' */
2021 static PyObject *__pyx_builtin_ValueError;
2022 static PyObject *__pyx_builtin_TypeError;
2023 static PyObject *__pyx_builtin_object;
2024 static PyObject *__pyx_builtin_IndexError;
2025 static PyObject *__pyx_builtin_AttributeError;
2026 static PyObject *__pyx_builtin_oct;
2027 static PyObject *__pyx_builtin_hex;
2028 static PyObject *__pyx_builtin_enumerate;
2029 static PyObject *__pyx_builtin_map;
2030 static PyObject *__pyx_builtin_MemoryError;
2031 static const char __pyx_k_[] = "";
2032 static const char __pyx_k_0[] = "0";
2033 static const char __pyx_k_1[] = "1";
2034 static const char __pyx_k_E[] = "E";
2035 static const char __pyx_k_U[] = "U";
2036 static const char __pyx_k_b[] = "b";
2037 static const char __pyx_k_c[] = "c";
2038 static const char __pyx_k_f[] = "f";
2039 static const char __pyx_k_i[] = "i";
2040 static const char __pyx_k_s[] = "{%s}*";
2041 static const char __pyx_k_ID[] = "ID";
2042 static const char __pyx_k__2[] = ".";
2043 static const char __pyx_k__4[] = "'";
2044 static const char __pyx_k__9[] = "{";
2045   static const char __pyx_k_kw[] = "kw";
2046   static const char __pyx_k_ns[] = "ns";
2047   static const char __pyx_k_of[] = "' of '";
2048   static const char __pyx_k_on[] = "on";
2049   static const char __pyx_k_py[] = "py:";
2050   static const char __pyx_k_re[] = "re";
2051   static const char __pyx_k_XML[] = "XML";
2052   static const char __pyx_k__10[] = "    ";
2053   static const char __pyx_k__11[] = " = ";
2054   static const char __pyx_k__12[] = " [";
2055   static const char __pyx_k__13[] = "]\n";
2056   static const char __pyx_k__14[] = "  * ";
2057   static const char __pyx_k__15[] = "\n";
2058   static const char __pyx_k__17[] = ":";
2059   static const char __pyx_k__19[] = "{}";
2060   static const char __pyx_k__20[] = "[";
2061   static const char __pyx_k__21[] = "]";
2062   static const char __pyx_k__23[] = "__.*__$";
2063   static const char __pyx_k_all[] = "__all__";
2064   static const char __pyx_k_end[] = "end";
2065   static const char __pyx_k_get[] = "get";
2066   static const char __pyx_k_got[] = ", got ";
2067   static const char __pyx_k_hex[] = "hex";
2068   static const char __pyx_k_int[] = "int";
2069   static const char __pyx_k_map[] = "map";
2070   static const char __pyx_k_obj[] = "obj";
2071   static const char __pyx_k_oct[] = "oct";
2072   static const char __pyx_k_s_2[] = "{%s}";
2073   static const char __pyx_k_s_3[] = "s";
2074   static const char __pyx_k_set[] = "__set__";
2075   static const char __pyx_k_str[] = "str";
2076   static const char __pyx_k_tag[] = "tag";
2077   static const char __pyx_k_xml[] = "xml";
2078   static const char __pyx_k_xsd[] = "xsd:";
2079   static const char __pyx_k_xsi[] = "xsi:";
2080   static const char __pyx_k_Name[] = "Name";
2081   static const char __pyx_k_None[] = "None";
2082   static const char __pyx_k_TREE[] = "TREE";
2083   static const char __pyx_k_base[] = "base";
2084   static const char __pyx_k_bool[] = "bool";
2085   static const char __pyx_k_byte[] = "byte";
2086   static const char __pyx_k_call[] = "__call__";
2087   static const char __pyx_k_copy[] = "__copy__";
2088   static const char __pyx_k_data[] = "data";
2089   static const char __pyx_k_dump[] = "dump";
2090   static const char __pyx_k_init[] = "_init";
2091   static const char __pyx_k_item[] = "item";
2092   static const char __pyx_k_long[] = "long";
2093   static const char __pyx_k_lxml[] = "lxml";
2094   static const char __pyx_k_main[] = "__main__";
2095   static const char __pyx_k_name[] = "name";
2096   static const char __pyx_k_none[] = "none";
2097   static const char __pyx_k_path[] = "path";
2098   static const char __pyx_k_py_2[] = "py";
2099   static const char __pyx_k_repr[] = "repr";
2100   static const char __pyx_k_root[] = "root";
2101   static const char __pyx_k_self[] = "self";
2102   static const char __pyx_k_tail[] = "tail";
2103   static const char __pyx_k_temp[] = "temp";
2104   static const char __pyx_k_test[] = "__test__";
2105   static const char __pyx_k_text[] = "text";
2106   static const char __pyx_k_true[] = "true";
2107   static const char __pyx_k_IDREF[] = "IDREF";
2108   static const char __pyx_k_after[] = "after";
2109   static const char __pyx_k_check[] = "check";
2110   static const char __pyx_k_entry[] = "entry";
2111   static const char __pyx_k_etree[] = "etree";
2112   static const char __pyx_k_false[] = "false";
2113   static const char __pyx_k_float[] = "float";
2114   static const char __pyx_k_items[] = "items";
2115   static const char __pyx_k_known[] = "known";
2116   static const char __pyx_k_match[] = "match";
2117   static const char __pyx_k_nsmap[] = "nsmap";
2118   static const char __pyx_k_parse[] = "parse";
2119   static const char __pyx_k_pyval[] = "pyval";
2120   static const char __pyx_k_s_nil[] = "{%s}nil";
2121   static const char __pyx_k_short[] = "short";
2122   static const char __pyx_k_split[] = "split";
2123   static const char __pyx_k_strip[] = "strip";
2124   static const char __pyx_k_tag_2[] = "_tag";
2125   static const char __pyx_k_token[] = "token";
2126   static const char __pyx_k_types[] = "types";
2127   static const char __pyx_k_value[] = "value";
2128   static const char __pyx_k_xsd_2[] = "xsd";
2129   static const char __pyx_k_xsi_2[] = "xsi";
2130   static const char __pyx_k_xsi_3[] = "_xsi";
2131   static const char __pyx_k_ENTITY[] = "ENTITY";
2132   static const char __pyx_k_NCName[] = "NCName";
2133   static const char __pyx_k_PyType[] = "PyType";
2134   static const char __pyx_k_attrib[] = "attrib";
2135   static const char __pyx_k_before[] = "before";
2136   static const char __pyx_k_c_node[] = "c_node";
2137   static const char __pyx_k_double[] = "double";
2138   static const char __pyx_k_encode[] = "encode";
2139   static const char __pyx_k_groups[] = "groups";
2140   static const char __pyx_k_import[] = "__import__";
2141   static const char __pyx_k_name_2[] = "__name__";
2142   static const char __pyx_k_object[] = "object";
2143   static const char __pyx_k_parser[] = "parser";
2144   static const char __pyx_k_pickle[] = "pickle";
2145   static const char __pyx_k_prefix[] = "prefix";
2146   static const char __pyx_k_pytype[] = "pytype";
2147   static const char __pyx_k_reduce[] = "__reduce__";
2148   static const char __pyx_k_remove[] = "remove";
2149   static const char __pyx_k_result[] = "result";
2150   static const char __pyx_k_s_type[] = "{%s}type";
2151   static const char __pyx_k_string[] = "string";
2152   static const char __pyx_k_strlen[] = "strlen";
2153   static const char __pyx_k_strval[] = "strval";
2154   static const char __pyx_k_update[] = "update";
2155   static const char __pyx_k_values[] = "values";
2156   static const char __pyx_k_Element[] = "Element";
2157   static const char __pyx_k_NMTOKEN[] = "NMTOKEN";
2158   static const char __pyx_k_addattr[] = "addattr";
2159   static const char __pyx_k_addnext[] = "addnext";
2160   static const char __pyx_k_boolean[] = "boolean";
2161   static const char __pyx_k_compile[] = "compile";
2162   static const char __pyx_k_complex[] = "__complex__";
2163   static const char __pyx_k_copyreg[] = "copyreg";
2164   static const char __pyx_k_element[] = "element";
2165   static const char __pyx_k_getattr[] = "__getattr__";
2166   static const char __pyx_k_getitem[] = "__getitem__";
2167   static const char __pyx_k_hasattr[] = "hasattr";
2168   static const char __pyx_k_integer[] = "integer";
2169   static const char __pyx_k_py_type[] = "py_type";
2170   static const char __pyx_k_replace[] = "replace";
2171   static const char __pyx_k_setText[] = "_setText";
2172   static const char __pyx_k_setattr[] = "setattr";
2173   static const char __pyx_k_value_2[] = "_value";
2174   static const char __pyx_k_version[] = "__version__";
2175   static const char __pyx_k_xs_type[] = "xs_type";
2176   static const char __pyx_k_xsi_nil[] = "xsi_nil";
2177   static const char __pyx_k_NoneType[] = "NoneType";
2178   static const char __pyx_k_annotate[] = "annotate";
2179   static const char __pyx_k_base_url[] = "base_url";
2180   static const char __pyx_k_copy_reg[] = "copy_reg";
2181   static const char __pyx_k_function[] = "function";
2182   static const char __pyx_k_language[] = "language";
2183   static const char __pyx_k_last_pos[] = "last_pos";
2184   static const char __pyx_k_pytype_2[] = "_pytype";
2185   static const char __pyx_k_register[] = "register";
2186   static const char __pyx_k_tostring[] = "tostring";
2187   static const char __pyx_k_TypeError[] = "TypeError";
2188   static const char __pyx_k_XMLParser[] = "XMLParser";
2189   static const char __pyx_k_attribute[] = "attribute '";
2190   static const char __pyx_k_checkBool[] = "__checkBool";
2191   static const char __pyx_k_enumerate[] = "enumerate";
2192   static const char __pyx_k_first_pos[] = "first_pos";
2193   static const char __pyx_k_getparent[] = "getparent";
2194   static const char __pyx_k_namespace[] = "namespace";
2195   static const char __pyx_k_parseBool[] = "__parseBool";
2196   static const char __pyx_k_stringify[] = "stringify";
2197   static const char __pyx_k_IndexError[] = "IndexError";
2198   static const char __pyx_k_IntElement[] = "IntElement";
2199   static const char __pyx_k_ObjectPath[] = "ObjectPath";
2200   static const char __pyx_k_PyType_s_s[] = "PyType(%s, %s)";
2201   static const char __pyx_k_SubElement[] = "SubElement";
2202   static const char __pyx_k_ValueError[] = "ValueError";
2203   static const char __pyx_k_attributes[] = "_attributes";
2204   static const char __pyx_k_deannotate[] = "deannotate";
2205   static const char __pyx_k_empty_type[] = "empty_type";
2206   static const char __pyx_k_fromstring[] = "fromstring";
2207   static const char __pyx_k_ignore_old[] = "ignore_old";
2208   static const char __pyx_k_ignore_xsi[] = "ignore_xsi";
2209   static const char __pyx_k_lower_bool[] = "__lower_bool";
2210   static const char __pyx_k_makeparser[] = "makeparser";
2211   static const char __pyx_k_new_parser[] = "new_parser";
2212   static const char __pyx_k_pyannotate[] = "pyannotate";
2213   static const char __pyx_k_pytypename[] = "pytypename";
2214   static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2215   static const char __pyx_k_tree_class[] = "tree_class";
2216   static const char __pyx_k_type_check[] = "type_check";
2217   static const char __pyx_k_type_class[] = "type_class";
2218   static const char __pyx_k_unregister[] = "unregister";
2219   static const char __pyx_k_BoolElement[] = "BoolElement";
2220   static const char __pyx_k_DataElement[] = "DataElement";
2221   static const char __pyx_k_ElementTree[] = "ElementTree";
2222   static const char __pyx_k_LongElement[] = "LongElement";
2223   static const char __pyx_k_MemoryError[] = "MemoryError";
2224   static const char __pyx_k_NoneElement[] = "NoneElement";
2225   static const char __pyx_k_getchildren[] = "getchildren";
2226   static const char __pyx_k_makeelement[] = "makeelement";
2227   static const char __pyx_k_unsignedInt[] = "unsignedInt";
2228   static const char __pyx_k_xsiannotate[] = "xsiannotate";
2229   static const char __pyx_k_ElementMaker[] = "ElementMaker";
2230   static const char __pyx_k_FloatElement[] = "FloatElement";
2231   static const char __pyx_k_annotate_xsi[] = "annotate_xsi";
2232   static const char __pyx_k_empty_pytype[] = "empty_pytype";
2233   static const char __pyx_k_invalid_path[] = "invalid path";
2234   static const char __pyx_k_iterchildren[] = "iterchildren";
2235   static const char __pyx_k_unsignedByte[] = "unsignedByte";
2236   static const char __pyx_k_unsignedLong[] = "unsignedLong";
2237   static const char __pyx_k_ElementTree_2[] = "_ElementTree";
2238   static const char __pyx_k_Invalid_slice[] = "Invalid slice";
2239   static const char __pyx_k_NumberElement[] = "NumberElement";
2240   static const char __pyx_k_StringElement[] = "StringElement";
2241   static const char __pyx_k_attribute_tag[] = "attribute_tag";
2242   static const char __pyx_k_countchildren[] = "countchildren";
2243   static const char __pyx_k_ignore_pytype[] = "ignore_pytype";
2244   static const char __pyx_k_no_such_child[] = "no such child: ";
2245   static const char __pyx_k_unsignedShort[] = "unsignedShort";
2246   static const char __pyx_k_AttributeError[] = "AttributeError";
2247   static const char __pyx_k_lxml_objectify[] = "lxml.objectify";
2248   static const char __pyx_k_setValueParser[] = "_setValueParser";
2249   static const char __pyx_k_unicode_escape[] = "unicode-escape";
2250   static const char __pyx_k_xmlSchemaTypes[] = "xmlSchemaTypes";
2251   static const char __pyx_k_PyType_register[] = "PyType.register";
2252   static const char __pyx_k_annotate_pytype[] = "annotate_pytype";
2253   static const char __pyx_k_attribute_names[] = "attribute_names";
2254   static const char __pyx_k_descendantpaths[] = "descendantpaths";
2255   static const char __pyx_k_element_or_tree[] = "element_or_tree";
2256   static const char __pyx_k_negativeInteger[] = "negativeInteger";
2257   static const char __pyx_k_positiveInteger[] = "positiveInteger";
2258 static const char __pyx_k_s_s_s_s_s_0_9_s[] = "(\\.?)\\s*(?:\\{([^}]*)\\})?\\s*([^.{}\\[\\]\\s]+)\\s*(?:\\[\\s*([-0-9]+)\\s*\\])?";
2259 static const char __pyx_k_IntElement__init[] = "IntElement._init";
2260 static const char __pyx_k_PYTYPE_ATTRIBUTE[] = "PYTYPE_ATTRIBUTE";
2261 static const char __pyx_k_empty_data_class[] = "empty_data_class";
2262 static const char __pyx_k_normalizedString[] = "normalizedString";
2263 static const char __pyx_k_strip_attributes[] = "strip_attributes";
2264 static const char __pyx_k_BoolElement__init[] = "BoolElement._init";
2265 static const char __pyx_k_LongElement__init[] = "LongElement._init";
2266 static const char __pyx_k_PyType_unregister[] = "PyType.unregister";
2267 static const char __pyx_k_remove_blank_text[] = "remove_blank_text";
2268 static const char __pyx_k_FloatElement__init[] = "FloatElement._init";
2269 static const char __pyx_k_ObjectPath_addattr[] = "ObjectPath.addattr";
2270 static const char __pyx_k_ObjectPath_hasattr[] = "ObjectPath.hasattr";
2271 static const char __pyx_k_ObjectPath_setattr[] = "ObjectPath.setattr";
2272 static const char __pyx_k_ObjectifiedElement[] = "ObjectifiedElement";
2273 static const char __pyx_k_cleanup_namespaces[] = "cleanup_namespaces";
2274 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2275 static const char __pyx_k_getRegisteredTypes[] = "getRegisteredTypes";
2276 static const char __pyx_k_nonNegativeInteger[] = "nonNegativeInteger";
2277 static const char __pyx_k_nonPositiveInteger[] = "nonPositiveInteger";
2278 static const char __pyx_k_set_default_parser[] = "set_default_parser";
2279 static const char __pyx_k_unpickleElementTree[] = "__unpickleElementTree";
2280 static const char __pyx_k_ElementChildIterator[] = "ElementChildIterator";
2281 static const char __pyx_k_StringElement_strlen[] = "StringElement.strlen";
2282 static const char __pyx_k_enable_recursive_str[] = "enable_recursive_str";
2283 static const char __pyx_k_Invalid_boolean_value[] = "Invalid boolean value: '";
2284 static const char __pyx_k_ObjectifiedDataElement[] = "ObjectifiedDataElement";
2285 static const char __pyx_k_src_lxml_objectify_pyx[] = "src/lxml/objectify.pyx";
2286 static const char __pyx_k_NumberElement___complex[] = "NumberElement.__complex__";
2287 static const char __pyx_k_StringElement___complex[] = "StringElement.__complex__";
2288 static const char __pyx_k_cannot_update_root_node[] = "cannot update root node";
2289 static const char __pyx_k_objects_is_not_writable[] = "' objects is not writable";
2290 static const char __pyx_k_pickleReduceElementTree[] = "pickleReduceElementTree";
2291 static const char __pyx_k_src_lxml_objectpath_pxi[] = "src/lxml/objectpath.pxi";
2292 static const char __pyx_k_set_element_class_lookup[] = "set_element_class_lookup";
2293 static const char __pyx_k_set_pytype_attribute_tag[] = "set_pytype_attribute_tag";
2294 static const char __pyx_k_Cannot_register_tree_type[] = "Cannot register tree type";
2295 static const char __pyx_k_index_must_be_enclosed_in[] = "index must be enclosed in []";
2296 static const char __pyx_k_to_extended_slice_of_size[] = " to extended slice of size ";
2297 static const char __pyx_k_ObjectifiedElement_addattr[] = "ObjectifiedElement.addattr";
2298 static const char __pyx_k_Type_name_must_be_a_string[] = "Type name must be a string";
2299 static const char __pyx_k_invalid_types_for_operator[] = "invalid types for * operator";
2300 static const char __pyx_k_ObjectifiedElement___reduce[] = "ObjectifiedElement.__reduce__";
2301 static const char __pyx_k_ObjectifyElementClassLookup[] = "ObjectifyElementClassLookup";
2302 static const char __pyx_k_NumberElement__setValueParser[] = "NumberElement._setValueParser";
2303 static const char __pyx_k_ObjectifiedElement_getchildren[] = "ObjectifiedElement.getchildren";
2304 static const char __pyx_k_http_www_w3_org_2001_XMLSchema[] = "http://www.w3.org/2001/XMLSchema";
2305 static const char __pyx_k_index_not_allowed_on_root_node[] = "index not allowed on root node";
2306 static const char __pyx_k_ObjectifiedDataElement__setText[] = "ObjectifiedDataElement._setText";
2307 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";
2308 static const char __pyx_k_deleting_items_not_supported_by[] = "deleting items not supported by root element";
2309 static const char __pyx_k_Data_classes_must_inherit_from_O[] = "Data classes must inherit from ObjectifiedDataElement";
2310 static const char __pyx_k_ObjectifiedElement_countchildren[] = "ObjectifiedElement.countchildren";
2311 static const char __pyx_k_ObjectifiedElement_descendantpat[] = "ObjectifiedElement.descendantpaths";
2312 static const char __pyx_k_Type_check_function_must_be_call[] = "Type check function must be callable (or None)";
2313 static const char __pyx_k_XSD_types_require_the_XSD_namesp[] = "XSD types require the XSD namespace";
2314 static const char __pyx_k_argument_of_makeelement_paramete[] = "argument of 'makeelement' parameter must be callable, got ";
2315 static const char __pyx_k_assignment_to_root_element_is_in[] = "assignment to root element is invalid";
2316 static const char __pyx_k_attempt_to_assign_sequence_of_si[] = "attempt to assign sequence of size ";
2317 static const char __pyx_k_creating_indexed_path_attributes[] = "creating indexed path attributes is not supported";
2318 static const char __pyx_k_http_codespeak_net_lxml_objectif[] = "http://codespeak.net/lxml/objectify/pytype";
2319 static const char __pyx_k_http_www_w3_org_2001_XMLSchema_i[] = "http://www.w3.org/2001/XMLSchema-instance";
2320 static const char __pyx_k_inconsistent_before_after_depend[] = "inconsistent before/after dependencies";
2321 static const char __pyx_k_invalid_number_of_arguments_need[] = "invalid number of arguments: needs one or two";
2322 static const char __pyx_k_parser_must_inherit_from_lxml_et[] = "parser must inherit from lxml.etree.XMLParser";
2323 static const char __pyx_k_root_element_does_not_match_need[] = "root element does not match: need ";
2324 static PyObject *__pyx_kp_s_;
2325 static PyObject *__pyx_kp_u_;
2326 static PyObject *__pyx_kp_s_0;
2327 static PyObject *__pyx_kp_s_1;
2328 static PyObject *__pyx_n_s_AttributeError;
2329 static PyObject *__pyx_n_s_BoolElement;
2330 static PyObject *__pyx_n_u_BoolElement;
2331 static PyObject *__pyx_n_s_BoolElement__init;
2332 static PyObject *__pyx_kp_u_Cannot_register_tree_type;
2333 static PyObject *__pyx_n_s_DataElement;
2334 static PyObject *__pyx_n_u_DataElement;
2335 static PyObject *__pyx_kp_u_Data_classes_must_inherit_from_O;
2336 static PyObject *__pyx_n_s_E;
2337 static PyObject *__pyx_n_u_E;
2338 static PyObject *__pyx_n_u_ENTITY;
2339 static PyObject *__pyx_n_s_Element;
2340 static PyObject *__pyx_n_u_Element;
2341 static PyObject *__pyx_n_s_ElementChildIterator;
2342 static PyObject *__pyx_n_s_ElementMaker;
2343 static PyObject *__pyx_n_u_ElementMaker;
2344 static PyObject *__pyx_n_s_ElementTree;
2345 static PyObject *__pyx_n_s_ElementTree_2;
2346 static PyObject *__pyx_n_s_FloatElement;
2347 static PyObject *__pyx_n_u_FloatElement;
2348 static PyObject *__pyx_n_s_FloatElement__init;
2349 static PyObject *__pyx_n_u_ID;
2350 static PyObject *__pyx_n_u_IDREF;
2351 static PyObject *__pyx_n_s_IndexError;
2352 static PyObject *__pyx_n_s_IntElement;
2353 static PyObject *__pyx_n_u_IntElement;
2354 static PyObject *__pyx_n_s_IntElement__init;
2355 static PyObject *__pyx_kp_u_Invalid_boolean_value;
2356 static PyObject *__pyx_kp_u_Invalid_slice;
2357 static PyObject *__pyx_n_s_LongElement;
2358 static PyObject *__pyx_n_u_LongElement;
2359 static PyObject *__pyx_n_s_LongElement__init;
2360 static PyObject *__pyx_n_s_MemoryError;
2361 static PyObject *__pyx_n_u_NCName;
2362 static PyObject *__pyx_n_u_NMTOKEN;
2363 static PyObject *__pyx_n_u_Name;
2364 static PyObject *__pyx_n_s_None;
2365 static PyObject *__pyx_n_u_None;
2366 static PyObject *__pyx_n_s_NoneElement;
2367 static PyObject *__pyx_n_u_NoneElement;
2368 static PyObject *__pyx_n_s_NoneType;
2369 static PyObject *__pyx_n_u_NoneType;
2370 static PyObject *__pyx_n_s_NumberElement;
2371 static PyObject *__pyx_n_u_NumberElement;
2372 static PyObject *__pyx_n_s_NumberElement___complex;
2373 static PyObject *__pyx_n_s_NumberElement__setValueParser;
2374 static PyObject *__pyx_n_s_ObjectPath;
2375 static PyObject *__pyx_n_u_ObjectPath;
2376 static PyObject *__pyx_n_s_ObjectPath_addattr;
2377 static PyObject *__pyx_n_s_ObjectPath_hasattr;
2378 static PyObject *__pyx_n_s_ObjectPath_setattr;
2379 static PyObject *__pyx_n_s_ObjectifiedDataElement;
2380 static PyObject *__pyx_n_u_ObjectifiedDataElement;
2381 static PyObject *__pyx_n_s_ObjectifiedDataElement__setText;
2382 static PyObject *__pyx_n_s_ObjectifiedElement;
2383 static PyObject *__pyx_n_u_ObjectifiedElement;
2384 static PyObject *__pyx_n_s_ObjectifiedElement___reduce;
2385 static PyObject *__pyx_n_s_ObjectifiedElement_addattr;
2386 static PyObject *__pyx_n_s_ObjectifiedElement_countchildren;
2387 static PyObject *__pyx_n_s_ObjectifiedElement_descendantpat;
2388 static PyObject *__pyx_n_s_ObjectifiedElement_getchildren;
2389 static PyObject *__pyx_n_s_ObjectifyElementClassLookup;
2390 static PyObject *__pyx_n_u_ObjectifyElementClassLookup;
2391 static PyObject *__pyx_n_s_PYTYPE_ATTRIBUTE;
2392 static PyObject *__pyx_n_u_PYTYPE_ATTRIBUTE;
2393 static PyObject *__pyx_n_s_PyType;
2394 static PyObject *__pyx_n_u_PyType;
2395 static PyObject *__pyx_n_s_PyType_register;
2396 static PyObject *__pyx_kp_s_PyType_s_s;
2397 static PyObject *__pyx_n_s_PyType_unregister;
2398 static PyObject *__pyx_n_s_StringElement;
2399 static PyObject *__pyx_n_u_StringElement;
2400 static PyObject *__pyx_n_s_StringElement___complex;
2401 static PyObject *__pyx_n_s_StringElement_strlen;
2402 static PyObject *__pyx_n_s_SubElement;
2403 static PyObject *__pyx_n_u_SubElement;
2404 static PyObject *__pyx_n_u_TREE;
2405 static PyObject *__pyx_n_s_TypeError;
2406 static PyObject *__pyx_kp_u_Type_check_function_must_be_call;
2407 static PyObject *__pyx_kp_u_Type_name_must_be_a_string;
2408 static PyObject *__pyx_n_s_U;
2409 static PyObject *__pyx_n_s_ValueError;
2410 static PyObject *__pyx_n_s_XML;
2411 static PyObject *__pyx_n_u_XML;
2412 static PyObject *__pyx_n_s_XMLParser;
2413 static PyObject *__pyx_kp_u_XSD_types_require_the_XSD_namesp;
2414 static PyObject *__pyx_kp_u__10;
2415 static PyObject *__pyx_kp_u__11;
2416 static PyObject *__pyx_kp_u__12;
2417 static PyObject *__pyx_kp_u__13;
2418 static PyObject *__pyx_kp_u__14;
2419 static PyObject *__pyx_kp_u__15;
2420 static PyObject *__pyx_kp_b__17;
2421 static PyObject *__pyx_kp_u__17;
2422 static PyObject *__pyx_kp_u__19;
2423 static PyObject *__pyx_kp_u__2;
2424 static PyObject *__pyx_kp_u__20;
2425 static PyObject *__pyx_kp_u__21;
2426 static PyObject *__pyx_kp_u__23;
2427 static PyObject *__pyx_kp_u__4;
2428 static PyObject *__pyx_kp_u__9;
2429 static PyObject *__pyx_n_s_addattr;
2430 static PyObject *__pyx_n_s_addnext;
2431 static PyObject *__pyx_n_s_after;
2432 static PyObject *__pyx_n_s_all;
2433 static PyObject *__pyx_n_s_annotate;
2434 static PyObject *__pyx_n_u_annotate;
2435 static PyObject *__pyx_n_s_annotate_pytype;
2436 static PyObject *__pyx_n_s_annotate_xsi;
2437 static PyObject *__pyx_kp_u_argument_of_makeelement_paramete;
2438 static PyObject *__pyx_kp_u_assignment_to_root_element_is_in;
2439 static PyObject *__pyx_kp_u_attempt_to_assign_sequence_of_si;
2440 static PyObject *__pyx_n_s_attrib;
2441 static PyObject *__pyx_kp_u_attribute;
2442 static PyObject *__pyx_n_s_attribute_names;
2443 static PyObject *__pyx_n_s_attribute_tag;
2444 static PyObject *__pyx_n_s_attributes;
2445 static PyObject *__pyx_n_s_b;
2446 static PyObject *__pyx_n_s_base;
2447 static PyObject *__pyx_n_u_base;
2448 static PyObject *__pyx_n_s_base_url;
2449 static PyObject *__pyx_n_s_before;
2450 static PyObject *__pyx_n_u_bool;
2451 static PyObject *__pyx_n_u_boolean;
2452 static PyObject *__pyx_n_u_byte;
2453 static PyObject *__pyx_n_s_c;
2454 static PyObject *__pyx_n_s_c_node;
2455 static PyObject *__pyx_n_s_call;
2456 static PyObject *__pyx_kp_u_cannot_update_root_node;
2457 static PyObject *__pyx_n_s_check;
2458 static PyObject *__pyx_n_s_checkBool;
2459 static PyObject *__pyx_n_s_cleanup_namespaces;
2460 static PyObject *__pyx_n_s_cline_in_traceback;
2461 static PyObject *__pyx_n_s_compile;
2462 static PyObject *__pyx_n_s_complex;
2463 static PyObject *__pyx_n_s_copy;
2464 static PyObject *__pyx_n_s_copy_reg;
2465 static PyObject *__pyx_n_s_copyreg;
2466 static PyObject *__pyx_n_s_countchildren;
2467 static PyObject *__pyx_kp_u_creating_indexed_path_attributes;
2468 static PyObject *__pyx_n_s_data;
2469 static PyObject *__pyx_n_s_deannotate;
2470 static PyObject *__pyx_n_u_deannotate;
2471 static PyObject *__pyx_kp_u_deleting_items_not_supported_by;
2472 static PyObject *__pyx_n_s_descendantpaths;
2473 static PyObject *__pyx_n_u_double;
2474 static PyObject *__pyx_n_s_dump;
2475 static PyObject *__pyx_n_u_dump;
2476 static PyObject *__pyx_n_s_element;
2477 static PyObject *__pyx_n_s_element_or_tree;
2478 static PyObject *__pyx_n_s_empty_data_class;
2479 static PyObject *__pyx_n_s_empty_pytype;
2480 static PyObject *__pyx_n_s_empty_type;
2481 static PyObject *__pyx_n_s_enable_recursive_str;
2482 static PyObject *__pyx_n_u_enable_recursive_str;
2483 static PyObject *__pyx_n_s_encode;
2484 static PyObject *__pyx_n_s_end;
2485 static PyObject *__pyx_n_s_entry;
2486 static PyObject *__pyx_n_s_enumerate;
2487 static PyObject *__pyx_n_s_etree;
2488 static PyObject *__pyx_n_s_f;
2489 static PyObject *__pyx_n_s_false;
2490 static PyObject *__pyx_n_u_false;
2491 static PyObject *__pyx_n_s_first_pos;
2492 static PyObject *__pyx_n_u_float;
2493 static PyObject *__pyx_n_s_fromstring;
2494 static PyObject *__pyx_n_u_fromstring;
2495 static PyObject *__pyx_n_s_function;
2496 static PyObject *__pyx_n_s_get;
2497 static PyObject *__pyx_n_s_getRegisteredTypes;
2498 static PyObject *__pyx_n_u_getRegisteredTypes;
2499 static PyObject *__pyx_n_s_getattr;
2500 static PyObject *__pyx_n_s_getchildren;
2501 static PyObject *__pyx_n_s_getitem;
2502 static PyObject *__pyx_n_s_getparent;
2503 static PyObject *__pyx_kp_u_got;
2504 static PyObject *__pyx_n_s_groups;
2505 static PyObject *__pyx_n_s_hasattr;
2506 static PyObject *__pyx_n_s_hex;
2507 static PyObject *__pyx_kp_u_http_codespeak_net_lxml_objectif;
2508 static PyObject *__pyx_kp_u_http_www_w3_org_2001_XMLSchema;
2509 static PyObject *__pyx_kp_u_http_www_w3_org_2001_XMLSchema_i;
2510 static PyObject *__pyx_n_s_i;
2511 static PyObject *__pyx_n_s_ignore_old;
2512 static PyObject *__pyx_n_s_ignore_pytype;
2513 static PyObject *__pyx_n_s_ignore_xsi;
2514 static PyObject *__pyx_n_s_import;
2515 static PyObject *__pyx_kp_u_inconsistent_before_after_depend;
2516 static PyObject *__pyx_kp_u_index_must_be_enclosed_in;
2517 static PyObject *__pyx_kp_u_index_not_allowed_on_root_node;
2518 static PyObject *__pyx_n_s_init;
2519 static PyObject *__pyx_n_u_int;
2520 static PyObject *__pyx_n_u_integer;
2521 static PyObject *__pyx_kp_u_invalid_number_of_arguments_need;
2522 static PyObject *__pyx_kp_u_invalid_path;
2523 static PyObject *__pyx_kp_u_invalid_types_for_operator;
2524 static PyObject *__pyx_n_s_item;
2525 static PyObject *__pyx_n_s_items;
2526 static PyObject *__pyx_n_s_iterchildren;
2527 static PyObject *__pyx_n_s_known;
2528 static PyObject *__pyx_n_s_kw;
2529 static PyObject *__pyx_n_u_language;
2530 static PyObject *__pyx_n_s_last_pos;
2531 static PyObject *__pyx_n_u_long;
2532 static PyObject *__pyx_n_s_lower_bool;
2533 static PyObject *__pyx_n_s_lxml;
2534 static PyObject *__pyx_n_s_lxml_objectify;
2535 static PyObject *__pyx_n_s_main;
2536 static PyObject *__pyx_n_s_makeelement;
2537 static PyObject *__pyx_n_s_makeparser;
2538 static PyObject *__pyx_n_u_makeparser;
2539 static PyObject *__pyx_n_s_map;
2540 static PyObject *__pyx_n_s_match;
2541 static PyObject *__pyx_n_s_name;
2542 static PyObject *__pyx_n_s_name_2;
2543 static PyObject *__pyx_n_s_namespace;
2544 static PyObject *__pyx_n_u_negativeInteger;
2545 static PyObject *__pyx_n_s_new_parser;
2546 static PyObject *__pyx_kp_u_no_such_child;
2547 static PyObject *__pyx_n_u_nonNegativeInteger;
2548 static PyObject *__pyx_n_u_nonPositiveInteger;
2549 static PyObject *__pyx_n_s_none;
2550 static PyObject *__pyx_n_u_none;
2551 static PyObject *__pyx_n_u_normalizedString;
2552 static PyObject *__pyx_n_s_ns;
2553 static PyObject *__pyx_n_s_nsmap;
2554 static PyObject *__pyx_n_s_obj;
2555 static PyObject *__pyx_n_s_object;
2556 static PyObject *__pyx_kp_u_objects_is_not_writable;
2557 static PyObject *__pyx_n_s_oct;
2558 static PyObject *__pyx_kp_u_of;
2559 static PyObject *__pyx_n_s_on;
2560 static PyObject *__pyx_n_s_parse;
2561 static PyObject *__pyx_n_u_parse;
2562 static PyObject *__pyx_n_s_parseBool;
2563 static PyObject *__pyx_n_s_parser;
2564 static PyObject *__pyx_kp_u_parser_must_inherit_from_lxml_et;
2565 static PyObject *__pyx_n_s_path;
2566 static PyObject *__pyx_n_s_pickle;
2567 static PyObject *__pyx_n_s_pickleReduceElementTree;
2568 static PyObject *__pyx_n_u_positiveInteger;
2569 static PyObject *__pyx_n_s_prefix;
2570 static PyObject *__pyx_kp_u_py;
2571 static PyObject *__pyx_n_s_py_2;
2572 static PyObject *__pyx_n_s_py_type;
2573 static PyObject *__pyx_n_s_pyannotate;
2574 static PyObject *__pyx_n_u_pyannotate;
2575 static PyObject *__pyx_n_s_pytype;
2576 static PyObject *__pyx_n_u_pytype;
2577 static PyObject *__pyx_n_s_pytype_2;
2578 static PyObject *__pyx_n_s_pytypename;
2579 static PyObject *__pyx_n_u_pytypename;
2580 static PyObject *__pyx_n_s_pyval;
2581 static PyObject *__pyx_n_u_pyval;
2582 static PyObject *__pyx_n_s_pyx_vtable;
2583 static PyObject *__pyx_n_s_re;
2584 static PyObject *__pyx_n_s_reduce;
2585 static PyObject *__pyx_n_s_register;
2586 static PyObject *__pyx_n_s_remove;
2587 static PyObject *__pyx_n_s_remove_blank_text;
2588 static PyObject *__pyx_n_s_replace;
2589 static PyObject *__pyx_n_s_repr;
2590 static PyObject *__pyx_n_s_result;
2591 static PyObject *__pyx_n_s_root;
2592 static PyObject *__pyx_kp_u_root_element_does_not_match_need;
2593 static PyObject *__pyx_kp_u_s;
2594 static PyObject *__pyx_kp_u_s_2;
2595 static PyObject *__pyx_n_s_s_3;
2596 static PyObject *__pyx_kp_u_s_nil;
2597 static PyObject *__pyx_kp_u_s_s_s_s_s_0_9_s;
2598 static PyObject *__pyx_kp_u_s_type;
2599 static PyObject *__pyx_n_s_self;
2600 static PyObject *__pyx_n_s_set;
2601 static PyObject *__pyx_n_s_setText;
2602 static PyObject *__pyx_n_s_setValueParser;
2603 static PyObject *__pyx_n_s_set_default_parser;
2604 static PyObject *__pyx_n_u_set_default_parser;
2605 static PyObject *__pyx_n_s_set_element_class_lookup;
2606 static PyObject *__pyx_n_s_set_pytype_attribute_tag;
2607 static PyObject *__pyx_n_u_set_pytype_attribute_tag;
2608 static PyObject *__pyx_n_s_setattr;
2609 static PyObject *__pyx_n_u_short;
2610 static PyObject *__pyx_n_s_split;
2611 static PyObject *__pyx_kp_s_src_lxml_objectify_pyx;
2612 static PyObject *__pyx_kp_s_src_lxml_objectpath_pxi;
2613 static PyObject *__pyx_n_u_str;
2614 static PyObject *__pyx_n_u_string;
2615 static PyObject *__pyx_n_s_stringify;
2616 static PyObject *__pyx_n_s_strip;
2617 static PyObject *__pyx_n_s_strip_attributes;
2618 static PyObject *__pyx_n_s_strlen;
2619 static PyObject *__pyx_n_s_strval;
2620 static PyObject *__pyx_n_s_tag;
2621 static PyObject *__pyx_n_u_tag;
2622 static PyObject *__pyx_n_s_tag_2;
2623 static PyObject *__pyx_n_u_tail;
2624 static PyObject *__pyx_n_s_temp;
2625 static PyObject *__pyx_n_s_test;
2626 static PyObject *__pyx_n_s_text;
2627 static PyObject *__pyx_n_u_text;
2628 static PyObject *__pyx_kp_u_to_extended_slice_of_size;
2629 static PyObject *__pyx_n_u_token;
2630 static PyObject *__pyx_n_s_tostring;
2631 static PyObject *__pyx_n_s_tree_class;
2632 static PyObject *__pyx_n_s_true;
2633 static PyObject *__pyx_n_u_true;
2634 static PyObject *__pyx_n_s_type_check;
2635 static PyObject *__pyx_n_s_type_class;
2636 static PyObject *__pyx_n_s_types;
2637 static PyObject *__pyx_kp_s_unicode_escape;
2638 static PyObject *__pyx_n_s_unpickleElementTree;
2639 static PyObject *__pyx_n_s_unregister;
2640 static PyObject *__pyx_n_u_unsignedByte;
2641 static PyObject *__pyx_n_u_unsignedInt;
2642 static PyObject *__pyx_n_u_unsignedLong;
2643 static PyObject *__pyx_n_u_unsignedShort;
2644 static PyObject *__pyx_n_s_update;
2645 static PyObject *__pyx_n_s_value;
2646 static PyObject *__pyx_n_u_value;
2647 static PyObject *__pyx_n_s_value_2;
2648 static PyObject *__pyx_n_s_values;
2649 static PyObject *__pyx_n_s_version;
2650 static PyObject *__pyx_n_s_xml;
2651 static PyObject *__pyx_n_s_xmlSchemaTypes;
2652 static PyObject *__pyx_n_s_xs_type;
2653 static PyObject *__pyx_kp_u_xsd;
2654 static PyObject *__pyx_n_s_xsd_2;
2655 static PyObject *__pyx_kp_u_xsi;
2656 static PyObject *__pyx_n_s_xsi_2;
2657 static PyObject *__pyx_n_s_xsi_3;
2658 static PyObject *__pyx_n_s_xsi_nil;
2659 static PyObject *__pyx_n_s_xsiannotate;
2660 static PyObject *__pyx_n_u_xsiannotate;
2661 static PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attribute_tag); /* proto */
2662 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2663 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_2__str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2664 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2665 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2666 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2667 static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2668 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8countchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2669 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_10getchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2670 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_12__getattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
2671 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 */
2672 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_16__delattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
2673 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 */
2674 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_20__getitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
2675 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 */
2676 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_24__delitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
2677 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_26descendantpaths(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
2678 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self); /* proto */
2679 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self); /* proto */
2680 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_2__repr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self); /* proto */
2681 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_4_setText(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self, PyObject *__pyx_v_s); /* proto */
2682 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self, PyObject *__pyx_v_function); /* proto */
2683 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2684 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_2__int__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2685 #if PY_MAJOR_VERSION < 3
2686 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_4__long__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2687 #endif
2688 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_6__float__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2689 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_8__complex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2690 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_10__str__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2691 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_12__repr__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2692 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2693 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_14__oct__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2694 #endif
2695 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2696 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_16__hex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2697 #endif
2698 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 */
2699 static Py_hash_t __pyx_pf_4lxml_9objectify_13NumberElement_20__hash__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2700 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_22__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2701 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_24__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2702 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_26__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2703 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2704 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_28__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2705 #endif
2706 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_30__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2707 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_32__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2708 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_34__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /* proto */
2709 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_36__neg__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2710 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_38__pos__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2711 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_40__abs__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2712 static int __pyx_pf_4lxml_9objectify_13NumberElement_42__nonzero__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2713 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_44__invert__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2714 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_46__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2715 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_48__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2716 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_50__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2717 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_52__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2718 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_54__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2719 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self); /* proto */
2720 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement_2__index__(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self); /* proto */
2721 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self); /* proto */
2722 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement_2__index__(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self); /* proto */
2723 static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(struct __pyx_obj_4lxml_9objectify_FloatElement *__pyx_v_self); /* proto */
2724 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2725 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2726 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_2strlen(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2727 static int __pyx_pf_4lxml_9objectify_13StringElement_4__nonzero__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2728 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 */
2729 static Py_hash_t __pyx_pf_4lxml_9objectify_13StringElement_8__hash__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2730 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2731 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_12__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2732 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_14__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2733 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_16__int__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2734 #if PY_MAJOR_VERSION < 3
2735 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_18__long__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2736 #endif
2737 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_20__float__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2738 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_22__complex__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2739 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2740 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_2__repr__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2741 static int __pyx_pf_4lxml_9objectify_11NoneElement_4__nonzero__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2742 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 */
2743 static Py_hash_t __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2744 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2745 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2746 static int __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2747 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 */
2748 static Py_hash_t __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2749 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_8__str__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2750 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2751 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2752 static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
2753 static PyObject *__pyx_pf_4lxml_9objectify_4__parseBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
2754 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 */
2755 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_2__repr__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2756 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 */
2757 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2758 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2759 static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_types); /* proto */
2760 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4name___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2761 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_10type_check___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2762 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_9stringify___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2763 static PyObject *__pyx_pf_4lxml_9objectify_6__lower_bool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b); /* proto */
2764 static PyObject *__pyx_pf_4lxml_9objectify_8pytypename(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2765 static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2766 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 */
2767 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 */
2768 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
2769 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 */
2770 static PyObject *__pyx_pf_4lxml_9objectify_12enable_recursive_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_on); /* proto */
2771 static PyObject *__pyx_pf_4lxml_9objectify_14dump(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlElement *__pyx_v_element); /* proto */
2772 static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
2773 static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2774 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 */
2775 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 */
2776 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 */
2777 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 */
2778 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 */
2779 static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_parser); /* proto */
2780 static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kw); /* proto */
2781 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 */
2782 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 */
2783 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 */
2784 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 */
2785 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 */
2786 static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
2787 static void __pyx_pf_4lxml_9objectify_10ObjectPath_2__dealloc__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self); /* proto */
2788 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4__str__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self); /* proto */
2789 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 */
2790 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_8hasattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root); /* proto */
2791 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 */
2792 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 */
2793 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4find___get__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self); /* proto */
2794 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2795 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2796 static PyObject *__pyx_tp_new_4lxml_9objectify_NumberElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2797 static PyObject *__pyx_tp_new_4lxml_9objectify_IntElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2798 static PyObject *__pyx_tp_new_4lxml_9objectify_LongElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2799 static PyObject *__pyx_tp_new_4lxml_9objectify_FloatElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2800 static PyObject *__pyx_tp_new_4lxml_9objectify_StringElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2801 static PyObject *__pyx_tp_new_4lxml_9objectify_NoneElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2802 static PyObject *__pyx_tp_new_4lxml_9objectify_BoolElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2803 static PyObject *__pyx_tp_new_4lxml_9objectify_PyType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2804 static PyObject *__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2805 static PyObject *__pyx_tp_new_4lxml_9objectify_ElementMaker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2806 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2807 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectPath(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2808 static __Pyx_CachedCFunction __pyx_umethod_PyBytes_Type_split = {0, &__pyx_n_s_split, 0, 0, 0};
2809 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0};
2810 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
2811 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, &__pyx_n_s_values, 0, 0, 0};
2812 static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_remove = {0, &__pyx_n_s_remove, 0, 0, 0};
2813 static __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type_strip = {0, &__pyx_n_s_strip, 0, 0, 0};
2814 static PyObject *__pyx_int_0;
2815 static PyObject *__pyx_int_1;
2816 static PyObject *__pyx_int_neg_1;
2817 static PyObject *__pyx_slice__3;
2818 static PyObject *__pyx_tuple__5;
2819 static PyObject *__pyx_tuple__6;
2820 static PyObject *__pyx_tuple__7;
2821 static PyObject *__pyx_tuple__8;
2822 static PyObject *__pyx_slice__16;
2823 static PyObject *__pyx_tuple__18;
2824 static PyObject *__pyx_tuple__22;
2825 static PyObject *__pyx_tuple__24;
2826 static PyObject *__pyx_tuple__25;
2827 static PyObject *__pyx_tuple__27;
2828 static PyObject *__pyx_tuple__28;
2829 static PyObject *__pyx_tuple__30;
2830 static PyObject *__pyx_tuple__32;
2831 static PyObject *__pyx_tuple__34;
2832 static PyObject *__pyx_tuple__36;
2833 static PyObject *__pyx_tuple__38;
2834 static PyObject *__pyx_tuple__40;
2835 static PyObject *__pyx_tuple__42;
2836 static PyObject *__pyx_tuple__44;
2837 static PyObject *__pyx_tuple__46;
2838 static PyObject *__pyx_tuple__48;
2839 static PyObject *__pyx_tuple__50;
2840 static PyObject *__pyx_tuple__52;
2841 static PyObject *__pyx_tuple__54;
2842 static PyObject *__pyx_tuple__56;
2843 static PyObject *__pyx_tuple__58;
2844 static PyObject *__pyx_tuple__60;
2845 static PyObject *__pyx_tuple__62;
2846 static PyObject *__pyx_tuple__64;
2847 static PyObject *__pyx_tuple__66;
2848 static PyObject *__pyx_tuple__68;
2849 static PyObject *__pyx_tuple__70;
2850 static PyObject *__pyx_tuple__72;
2851 static PyObject *__pyx_tuple__73;
2852 static PyObject *__pyx_tuple__75;
2853 static PyObject *__pyx_tuple__77;
2854 static PyObject *__pyx_tuple__79;
2855 static PyObject *__pyx_tuple__81;
2856 static PyObject *__pyx_tuple__83;
2857 static PyObject *__pyx_tuple__85;
2858 static PyObject *__pyx_tuple__87;
2859 static PyObject *__pyx_tuple__89;
2860 static PyObject *__pyx_tuple__90;
2861 static PyObject *__pyx_tuple__92;
2862 static PyObject *__pyx_tuple__94;
2863 static PyObject *__pyx_tuple__95;
2864 static PyObject *__pyx_tuple__97;
2865 static PyObject *__pyx_tuple__98;
2866 static PyObject *__pyx_tuple__100;
2867 static PyObject *__pyx_tuple__101;
2868 static PyObject *__pyx_tuple__103;
2869 static PyObject *__pyx_tuple__104;
2870 static PyObject *__pyx_tuple__106;
2871 static PyObject *__pyx_tuple__107;
2872 static PyObject *__pyx_tuple__109;
2873 static PyObject *__pyx_tuple__111;
2874 static PyObject *__pyx_tuple__113;
2875 static PyObject *__pyx_codeobj__26;
2876 static PyObject *__pyx_codeobj__29;
2877 static PyObject *__pyx_codeobj__31;
2878 static PyObject *__pyx_codeobj__33;
2879 static PyObject *__pyx_codeobj__35;
2880 static PyObject *__pyx_codeobj__37;
2881 static PyObject *__pyx_codeobj__39;
2882 static PyObject *__pyx_codeobj__41;
2883 static PyObject *__pyx_codeobj__43;
2884 static PyObject *__pyx_codeobj__45;
2885 static PyObject *__pyx_codeobj__47;
2886 static PyObject *__pyx_codeobj__49;
2887 static PyObject *__pyx_codeobj__51;
2888 static PyObject *__pyx_codeobj__53;
2889 static PyObject *__pyx_codeobj__55;
2890 static PyObject *__pyx_codeobj__57;
2891 static PyObject *__pyx_codeobj__59;
2892 static PyObject *__pyx_codeobj__61;
2893 static PyObject *__pyx_codeobj__63;
2894 static PyObject *__pyx_codeobj__65;
2895 static PyObject *__pyx_codeobj__67;
2896 static PyObject *__pyx_codeobj__69;
2897 static PyObject *__pyx_codeobj__71;
2898 static PyObject *__pyx_codeobj__74;
2899 static PyObject *__pyx_codeobj__76;
2900 static PyObject *__pyx_codeobj__78;
2901 static PyObject *__pyx_codeobj__80;
2902 static PyObject *__pyx_codeobj__82;
2903 static PyObject *__pyx_codeobj__84;
2904 static PyObject *__pyx_codeobj__86;
2905 static PyObject *__pyx_codeobj__88;
2906 static PyObject *__pyx_codeobj__91;
2907 static PyObject *__pyx_codeobj__93;
2908 static PyObject *__pyx_codeobj__96;
2909 static PyObject *__pyx_codeobj__99;
2910 static PyObject *__pyx_codeobj__102;
2911 static PyObject *__pyx_codeobj__105;
2912 static PyObject *__pyx_codeobj__108;
2913 static PyObject *__pyx_codeobj__110;
2914 static PyObject *__pyx_codeobj__112;
2915 /* Late includes */
2916
2917 /* "lxml/objectify.pyx":50
2918  * # Duplicated from apihelpers.pxi, since dependencies obstruct
2919  * # including apihelpers.pxi.
2920  * cdef strrepr(s):             # <<<<<<<<<<<<<<
2921  *     """Build a representation of strings which we can use in __repr__
2922  *     methods, e.g. _Element.__repr__().
2923  */
2924
2925 static PyObject *__pyx_f_4lxml_9objectify_strrepr(PyObject *__pyx_v_s) {
2926   PyObject *__pyx_r = NULL;
2927   __Pyx_RefNannyDeclarations
2928   PyObject *__pyx_t_1 = NULL;
2929   PyObject *__pyx_t_2 = NULL;
2930   PyObject *__pyx_t_3 = NULL;
2931   PyObject *__pyx_t_4 = NULL;
2932   int __pyx_lineno = 0;
2933   const char *__pyx_filename = NULL;
2934   int __pyx_clineno = 0;
2935   __Pyx_RefNannySetupContext("strrepr", 0);
2936
2937   /* "lxml/objectify.pyx":54
2938  *     methods, e.g. _Element.__repr__().
2939  *     """
2940  *     return s.encode('unicode-escape') if python.IS_PYTHON2 else s             # <<<<<<<<<<<<<<
2941  * 
2942  * 
2943  */
2944   __Pyx_XDECREF(__pyx_r);
2945   if ((IS_PYTHON2 != 0)) {
2946     __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)
2947     __Pyx_GOTREF(__pyx_t_3);
2948     __pyx_t_4 = NULL;
2949     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
2950       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2951       if (likely(__pyx_t_4)) {
2952         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2953         __Pyx_INCREF(__pyx_t_4);
2954         __Pyx_INCREF(function);
2955         __Pyx_DECREF_SET(__pyx_t_3, function);
2956       }
2957     }
2958     __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);
2959     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2960     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
2961     __Pyx_GOTREF(__pyx_t_2);
2962     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2963     __pyx_t_1 = __pyx_t_2;
2964     __pyx_t_2 = 0;
2965   } else {
2966     __Pyx_INCREF(__pyx_v_s);
2967     __pyx_t_1 = __pyx_v_s;
2968   }
2969   __pyx_r = __pyx_t_1;
2970   __pyx_t_1 = 0;
2971   goto __pyx_L0;
2972
2973   /* "lxml/objectify.pyx":50
2974  * # Duplicated from apihelpers.pxi, since dependencies obstruct
2975  * # including apihelpers.pxi.
2976  * cdef strrepr(s):             # <<<<<<<<<<<<<<
2977  *     """Build a representation of strings which we can use in __repr__
2978  *     methods, e.g. _Element.__repr__().
2979  */
2980
2981   /* function exit code */
2982   __pyx_L1_error:;
2983   __Pyx_XDECREF(__pyx_t_1);
2984   __Pyx_XDECREF(__pyx_t_2);
2985   __Pyx_XDECREF(__pyx_t_3);
2986   __Pyx_XDECREF(__pyx_t_4);
2987   __Pyx_AddTraceback("lxml.objectify.strrepr", __pyx_clineno, __pyx_lineno, __pyx_filename);
2988   __pyx_r = 0;
2989   __pyx_L0:;
2990   __Pyx_XGIVEREF(__pyx_r);
2991   __Pyx_RefNannyFinishContext();
2992   return __pyx_r;
2993 }
2994
2995 /* "lxml/objectify.pyx":57
2996  * 
2997  * 
2998  * cdef object _typename(object t):             # <<<<<<<<<<<<<<
2999  *     cdef const_char* c_name
3000  *     c_name = python._fqtypename(t)
3001  */
3002
3003 static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *__pyx_v_t) {
3004   const char *__pyx_v_c_name;
3005   char *__pyx_v_s;
3006   PyObject *__pyx_r = NULL;
3007   __Pyx_RefNannyDeclarations
3008   int __pyx_t_1;
3009   PyObject *__pyx_t_2 = NULL;
3010   int __pyx_lineno = 0;
3011   const char *__pyx_filename = NULL;
3012   int __pyx_clineno = 0;
3013   __Pyx_RefNannySetupContext("_typename", 0);
3014
3015   /* "lxml/objectify.pyx":59
3016  * cdef object _typename(object t):
3017  *     cdef const_char* c_name
3018  *     c_name = python._fqtypename(t)             # <<<<<<<<<<<<<<
3019  *     s = cstring_h.strrchr(c_name, c'.')
3020  *     if s is not NULL:
3021  */
3022   __pyx_v_c_name = _fqtypename(__pyx_v_t);
3023
3024   /* "lxml/objectify.pyx":60
3025  *     cdef const_char* c_name
3026  *     c_name = python._fqtypename(t)
3027  *     s = cstring_h.strrchr(c_name, c'.')             # <<<<<<<<<<<<<<
3028  *     if s is not NULL:
3029  *         c_name = s + 1
3030  */
3031   __pyx_v_s = strrchr(__pyx_v_c_name, '.');
3032
3033   /* "lxml/objectify.pyx":61
3034  *     c_name = python._fqtypename(t)
3035  *     s = cstring_h.strrchr(c_name, c'.')
3036  *     if s is not NULL:             # <<<<<<<<<<<<<<
3037  *         c_name = s + 1
3038  *     return pyunicode(<const_xmlChar*>c_name)
3039  */
3040   __pyx_t_1 = ((__pyx_v_s != NULL) != 0);
3041   if (__pyx_t_1) {
3042
3043     /* "lxml/objectify.pyx":62
3044  *     s = cstring_h.strrchr(c_name, c'.')
3045  *     if s is not NULL:
3046  *         c_name = s + 1             # <<<<<<<<<<<<<<
3047  *     return pyunicode(<const_xmlChar*>c_name)
3048  * 
3049  */
3050     __pyx_v_c_name = (__pyx_v_s + 1);
3051
3052     /* "lxml/objectify.pyx":61
3053  *     c_name = python._fqtypename(t)
3054  *     s = cstring_h.strrchr(c_name, c'.')
3055  *     if s is not NULL:             # <<<<<<<<<<<<<<
3056  *         c_name = s + 1
3057  *     return pyunicode(<const_xmlChar*>c_name)
3058  */
3059   }
3060
3061   /* "lxml/objectify.pyx":63
3062  *     if s is not NULL:
3063  *         c_name = s + 1
3064  *     return pyunicode(<const_xmlChar*>c_name)             # <<<<<<<<<<<<<<
3065  * 
3066  * 
3067  */
3068   __Pyx_XDECREF(__pyx_r);
3069   __pyx_t_2 = pyunicode(((const xmlChar *)__pyx_v_c_name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
3070   __Pyx_GOTREF(__pyx_t_2);
3071   __pyx_r = __pyx_t_2;
3072   __pyx_t_2 = 0;
3073   goto __pyx_L0;
3074
3075   /* "lxml/objectify.pyx":57
3076  * 
3077  * 
3078  * cdef object _typename(object t):             # <<<<<<<<<<<<<<
3079  *     cdef const_char* c_name
3080  *     c_name = python._fqtypename(t)
3081  */
3082
3083   /* function exit code */
3084   __pyx_L1_error:;
3085   __Pyx_XDECREF(__pyx_t_2);
3086   __Pyx_AddTraceback("lxml.objectify._typename", __pyx_clineno, __pyx_lineno, __pyx_filename);
3087   __pyx_r = 0;
3088   __pyx_L0:;
3089   __Pyx_XGIVEREF(__pyx_r);
3090   __Pyx_RefNannyFinishContext();
3091   return __pyx_r;
3092 }
3093
3094 /* "lxml/objectify.pyx":79
3095  * cdef unicode TREE_PYTYPE_NAME = u"TREE"
3096  * 
3097  * cdef tuple _unicodeAndUtf8(s):             # <<<<<<<<<<<<<<
3098  *     return s, python.PyUnicode_AsUTF8String(s)
3099  * 
3100  */
3101
3102 static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *__pyx_v_s) {
3103   PyObject *__pyx_r = NULL;
3104   __Pyx_RefNannyDeclarations
3105   PyObject *__pyx_t_1 = NULL;
3106   PyObject *__pyx_t_2 = NULL;
3107   int __pyx_lineno = 0;
3108   const char *__pyx_filename = NULL;
3109   int __pyx_clineno = 0;
3110   __Pyx_RefNannySetupContext("_unicodeAndUtf8", 0);
3111
3112   /* "lxml/objectify.pyx":80
3113  * 
3114  * cdef tuple _unicodeAndUtf8(s):
3115  *     return s, python.PyUnicode_AsUTF8String(s)             # <<<<<<<<<<<<<<
3116  * 
3117  * def set_pytype_attribute_tag(attribute_tag=None):
3118  */
3119   __Pyx_XDECREF(__pyx_r);
3120   __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
3121   __Pyx_GOTREF(__pyx_t_1);
3122   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
3123   __Pyx_GOTREF(__pyx_t_2);
3124   __Pyx_INCREF(__pyx_v_s);
3125   __Pyx_GIVEREF(__pyx_v_s);
3126   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s);
3127   __Pyx_GIVEREF(__pyx_t_1);
3128   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
3129   __pyx_t_1 = 0;
3130   __pyx_r = ((PyObject*)__pyx_t_2);
3131   __pyx_t_2 = 0;
3132   goto __pyx_L0;
3133
3134   /* "lxml/objectify.pyx":79
3135  * cdef unicode TREE_PYTYPE_NAME = u"TREE"
3136  * 
3137  * cdef tuple _unicodeAndUtf8(s):             # <<<<<<<<<<<<<<
3138  *     return s, python.PyUnicode_AsUTF8String(s)
3139  * 
3140  */
3141
3142   /* function exit code */
3143   __pyx_L1_error:;
3144   __Pyx_XDECREF(__pyx_t_1);
3145   __Pyx_XDECREF(__pyx_t_2);
3146   __Pyx_AddTraceback("lxml.objectify._unicodeAndUtf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
3147   __pyx_r = 0;
3148   __pyx_L0:;
3149   __Pyx_XGIVEREF(__pyx_r);
3150   __Pyx_RefNannyFinishContext();
3151   return __pyx_r;
3152 }
3153
3154 /* "lxml/objectify.pyx":82
3155  *     return s, python.PyUnicode_AsUTF8String(s)
3156  * 
3157  * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
3158  *     u"""set_pytype_attribute_tag(attribute_tag=None)
3159  *     Change name and namespace of the XML attribute that holds Python type
3160  */
3161
3162 /* Python wrapper */
3163 static PyObject *__pyx_pw_4lxml_9objectify_1set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3164 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    ";
3165 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};
3166 static PyObject *__pyx_pw_4lxml_9objectify_1set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3167   PyObject *__pyx_v_attribute_tag = 0;
3168   int __pyx_lineno = 0;
3169   const char *__pyx_filename = NULL;
3170   int __pyx_clineno = 0;
3171   PyObject *__pyx_r = 0;
3172   __Pyx_RefNannyDeclarations
3173   __Pyx_RefNannySetupContext("set_pytype_attribute_tag (wrapper)", 0);
3174   {
3175     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_tag,0};
3176     PyObject* values[1] = {0};
3177     values[0] = ((PyObject *)((PyObject *)Py_None));
3178     if (unlikely(__pyx_kwds)) {
3179       Py_ssize_t kw_args;
3180       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3181       switch (pos_args) {
3182         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3183         CYTHON_FALLTHROUGH;
3184         case  0: break;
3185         default: goto __pyx_L5_argtuple_error;
3186       }
3187       kw_args = PyDict_Size(__pyx_kwds);
3188       switch (pos_args) {
3189         case  0:
3190         if (kw_args > 0) {
3191           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attribute_tag);
3192           if (value) { values[0] = value; kw_args--; }
3193         }
3194       }
3195       if (unlikely(kw_args > 0)) {
3196         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_pytype_attribute_tag") < 0)) __PYX_ERR(0, 82, __pyx_L3_error)
3197       }
3198     } else {
3199       switch (PyTuple_GET_SIZE(__pyx_args)) {
3200         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3201         CYTHON_FALLTHROUGH;
3202         case  0: break;
3203         default: goto __pyx_L5_argtuple_error;
3204       }
3205     }
3206     __pyx_v_attribute_tag = values[0];
3207   }
3208   goto __pyx_L4_argument_unpacking_done;
3209   __pyx_L5_argtuple_error:;
3210   __Pyx_RaiseArgtupleInvalid("set_pytype_attribute_tag", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 82, __pyx_L3_error)
3211   __pyx_L3_error:;
3212   __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
3213   __Pyx_RefNannyFinishContext();
3214   return NULL;
3215   __pyx_L4_argument_unpacking_done:;
3216   __pyx_r = __pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(__pyx_self, __pyx_v_attribute_tag);
3217
3218   /* function exit code */
3219   __Pyx_RefNannyFinishContext();
3220   return __pyx_r;
3221 }
3222
3223 static PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attribute_tag) {
3224   PyObject *__pyx_r = NULL;
3225   __Pyx_RefNannyDeclarations
3226   int __pyx_t_1;
3227   int __pyx_t_2;
3228   PyObject *__pyx_t_3 = NULL;
3229   PyObject *__pyx_t_4 = NULL;
3230   PyObject *__pyx_t_5 = NULL;
3231   const xmlChar *__pyx_t_6;
3232   int __pyx_lineno = 0;
3233   const char *__pyx_filename = NULL;
3234   int __pyx_clineno = 0;
3235   __Pyx_RefNannySetupContext("set_pytype_attribute_tag", 0);
3236
3237   /* "lxml/objectify.pyx":96
3238  *     global PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8
3239  *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
3240  *     if attribute_tag is None:             # <<<<<<<<<<<<<<
3241  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
3242  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3243  */
3244   __pyx_t_1 = (__pyx_v_attribute_tag == Py_None);
3245   __pyx_t_2 = (__pyx_t_1 != 0);
3246   if (__pyx_t_2) {
3247
3248     /* "lxml/objectify.pyx":98
3249  *     if attribute_tag is None:
3250  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
3251  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")             # <<<<<<<<<<<<<<
3252  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3253  *             _unicodeAndUtf8(u"pytype")
3254  */
3255     __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)
3256     __Pyx_GOTREF(__pyx_t_3);
3257     if (likely(__pyx_t_3 != Py_None)) {
3258       PyObject* sequence = __pyx_t_3;
3259       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
3260       if (unlikely(size != 2)) {
3261         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
3262         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
3263         __PYX_ERR(0, 97, __pyx_L1_error)
3264       }
3265       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3266       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
3267       __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
3268       __Pyx_INCREF(__pyx_t_4);
3269       __Pyx_INCREF(__pyx_t_5);
3270       #else
3271       __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
3272       __Pyx_GOTREF(__pyx_t_4);
3273       __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error)
3274       __Pyx_GOTREF(__pyx_t_5);
3275       #endif
3276       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3277     } else {
3278       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 97, __pyx_L1_error)
3279     }
3280
3281     /* "lxml/objectify.pyx":97
3282  *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
3283  *     if attribute_tag is None:
3284  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \             # <<<<<<<<<<<<<<
3285  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3286  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3287  */
3288     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)
3289     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
3290     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE, __pyx_t_4);
3291     __Pyx_GIVEREF(__pyx_t_4);
3292     __pyx_t_4 = 0;
3293     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
3294     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8, ((PyObject*)__pyx_t_5));
3295     __Pyx_GIVEREF(__pyx_t_5);
3296     __pyx_t_5 = 0;
3297
3298     /* "lxml/objectify.pyx":100
3299  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3300  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3301  *             _unicodeAndUtf8(u"pytype")             # <<<<<<<<<<<<<<
3302  *     else:
3303  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3304  */
3305     __pyx_t_3 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(__pyx_n_u_pytype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error)
3306     __Pyx_GOTREF(__pyx_t_3);
3307     if (likely(__pyx_t_3 != Py_None)) {
3308       PyObject* sequence = __pyx_t_3;
3309       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
3310       if (unlikely(size != 2)) {
3311         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
3312         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
3313         __PYX_ERR(0, 99, __pyx_L1_error)
3314       }
3315       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3316       __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
3317       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
3318       __Pyx_INCREF(__pyx_t_5);
3319       __Pyx_INCREF(__pyx_t_4);
3320       #else
3321       __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
3322       __Pyx_GOTREF(__pyx_t_5);
3323       __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
3324       __Pyx_GOTREF(__pyx_t_4);
3325       #endif
3326       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3327     } else {
3328       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 99, __pyx_L1_error)
3329     }
3330
3331     /* "lxml/objectify.pyx":99
3332  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
3333  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3334  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
3335  *             _unicodeAndUtf8(u"pytype")
3336  *     else:
3337  */
3338     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)
3339     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
3340     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME, __pyx_t_5);
3341     __Pyx_GIVEREF(__pyx_t_5);
3342     __pyx_t_5 = 0;
3343     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
3344     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8, ((PyObject*)__pyx_t_4));
3345     __Pyx_GIVEREF(__pyx_t_4);
3346     __pyx_t_4 = 0;
3347
3348     /* "lxml/objectify.pyx":96
3349  *     global PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8
3350  *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
3351  *     if attribute_tag is None:             # <<<<<<<<<<<<<<
3352  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
3353  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3354  */
3355     goto __pyx_L3;
3356   }
3357
3358   /* "lxml/objectify.pyx":102
3359  *             _unicodeAndUtf8(u"pytype")
3360  *     else:
3361  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
3362  *             cetree.getNsTag(attribute_tag)
3363  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')
3364  */
3365   /*else*/ {
3366
3367     /* "lxml/objectify.pyx":103
3368  *     else:
3369  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3370  *             cetree.getNsTag(attribute_tag)             # <<<<<<<<<<<<<<
3371  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')
3372  *         PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8.decode('utf8')
3373  */
3374     __pyx_t_3 = getNsTag(__pyx_v_attribute_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
3375     __Pyx_GOTREF(__pyx_t_3);
3376     if (likely(__pyx_t_3 != Py_None)) {
3377       PyObject* sequence = __pyx_t_3;
3378       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
3379       if (unlikely(size != 2)) {
3380         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
3381         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
3382         __PYX_ERR(0, 102, __pyx_L1_error)
3383       }
3384       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3385       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
3386       __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
3387       __Pyx_INCREF(__pyx_t_4);
3388       __Pyx_INCREF(__pyx_t_5);
3389       #else
3390       __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
3391       __Pyx_GOTREF(__pyx_t_4);
3392       __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error)
3393       __Pyx_GOTREF(__pyx_t_5);
3394       #endif
3395       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3396     } else {
3397       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 102, __pyx_L1_error)
3398     }
3399
3400     /* "lxml/objectify.pyx":102
3401  *             _unicodeAndUtf8(u"pytype")
3402  *     else:
3403  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
3404  *             cetree.getNsTag(attribute_tag)
3405  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')
3406  */
3407     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)
3408     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)
3409     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
3410     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8, ((PyObject*)__pyx_t_4));
3411     __Pyx_GIVEREF(__pyx_t_4);
3412     __pyx_t_4 = 0;
3413     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
3414     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8, ((PyObject*)__pyx_t_5));
3415     __Pyx_GIVEREF(__pyx_t_5);
3416     __pyx_t_5 = 0;
3417
3418     /* "lxml/objectify.pyx":104
3419  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3420  *             cetree.getNsTag(attribute_tag)
3421  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')             # <<<<<<<<<<<<<<
3422  *         PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8.decode('utf8')
3423  * 
3424  */
3425     if (unlikely(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 == Py_None)) {
3426       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
3427       __PYX_ERR(0, 104, __pyx_L1_error)
3428     }
3429     __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)
3430     __Pyx_GOTREF(__pyx_t_3);
3431     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
3432     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE, __pyx_t_3);
3433     __Pyx_GIVEREF(__pyx_t_3);
3434     __pyx_t_3 = 0;
3435
3436     /* "lxml/objectify.pyx":105
3437  *             cetree.getNsTag(attribute_tag)
3438  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')
3439  *         PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8.decode('utf8')             # <<<<<<<<<<<<<<
3440  * 
3441  *     _PYTYPE_NAMESPACE      = PYTYPE_NAMESPACE_UTF8
3442  */
3443     if (unlikely(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 == Py_None)) {
3444       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
3445       __PYX_ERR(0, 105, __pyx_L1_error)
3446     }
3447     __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)
3448     __Pyx_GOTREF(__pyx_t_3);
3449     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
3450     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME, __pyx_t_3);
3451     __Pyx_GIVEREF(__pyx_t_3);
3452     __pyx_t_3 = 0;
3453   }
3454   __pyx_L3:;
3455
3456   /* "lxml/objectify.pyx":107
3457  *         PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8.decode('utf8')
3458  * 
3459  *     _PYTYPE_NAMESPACE      = PYTYPE_NAMESPACE_UTF8             # <<<<<<<<<<<<<<
3460  *     _PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8
3461  *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
3462  */
3463   if (unlikely(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 == Py_None)) {
3464     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
3465     __PYX_ERR(0, 107, __pyx_L1_error)
3466   }
3467   __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)
3468   __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE = __pyx_t_6;
3469
3470   /* "lxml/objectify.pyx":108
3471  * 
3472  *     _PYTYPE_NAMESPACE      = PYTYPE_NAMESPACE_UTF8
3473  *     _PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8             # <<<<<<<<<<<<<<
3474  *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
3475  *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
3476  */
3477   if (unlikely(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 == Py_None)) {
3478     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
3479     __PYX_ERR(0, 108, __pyx_L1_error)
3480   }
3481   __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)
3482   __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME = __pyx_t_6;
3483
3484   /* "lxml/objectify.pyx":109
3485  *     _PYTYPE_NAMESPACE      = PYTYPE_NAMESPACE_UTF8
3486  *     _PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8
3487  *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(             # <<<<<<<<<<<<<<
3488  *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
3489  * 
3490  */
3491   __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)
3492   __Pyx_GOTREF(__pyx_t_3);
3493   if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYTYPE_ATTRIBUTE, __pyx_t_3) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
3494   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3495
3496   /* "lxml/objectify.pyx":82
3497  *     return s, python.PyUnicode_AsUTF8String(s)
3498  * 
3499  * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
3500  *     u"""set_pytype_attribute_tag(attribute_tag=None)
3501  *     Change name and namespace of the XML attribute that holds Python type
3502  */
3503
3504   /* function exit code */
3505   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3506   goto __pyx_L0;
3507   __pyx_L1_error:;
3508   __Pyx_XDECREF(__pyx_t_3);
3509   __Pyx_XDECREF(__pyx_t_4);
3510   __Pyx_XDECREF(__pyx_t_5);
3511   __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
3512   __pyx_r = NULL;
3513   __pyx_L0:;
3514   __Pyx_XGIVEREF(__pyx_r);
3515   __Pyx_RefNannyFinishContext();
3516   return __pyx_r;
3517 }
3518
3519 /* "lxml/objectify.pyx":147
3520  *     subclasses.
3521  *     """
3522  *     def __iter__(self):             # <<<<<<<<<<<<<<
3523  *         u"""Iterate over self and all siblings with the same tag.
3524  *         """
3525  */
3526
3527 /* Python wrapper */
3528 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__(PyObject *__pyx_v_self); /*proto*/
3529 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__[] = "Iterate over self and all siblings with the same tag.\n        ";
3530 #if CYTHON_COMPILING_IN_CPYTHON
3531 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__;
3532 #endif
3533 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__(PyObject *__pyx_v_self) {
3534   PyObject *__pyx_r = 0;
3535   __Pyx_RefNannyDeclarations
3536   __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
3537   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3538
3539   /* function exit code */
3540   __Pyx_RefNannyFinishContext();
3541   return __pyx_r;
3542 }
3543
3544 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3545   PyObject *__pyx_v_parent = NULL;
3546   PyObject *__pyx_r = NULL;
3547   __Pyx_RefNannyDeclarations
3548   PyObject *__pyx_t_1 = NULL;
3549   PyObject *__pyx_t_2 = NULL;
3550   PyObject *__pyx_t_3 = NULL;
3551   int __pyx_t_4;
3552   int __pyx_t_5;
3553   PyObject *__pyx_t_6 = NULL;
3554   int __pyx_lineno = 0;
3555   const char *__pyx_filename = NULL;
3556   int __pyx_clineno = 0;
3557   __Pyx_RefNannySetupContext("__iter__", 0);
3558
3559   /* "lxml/objectify.pyx":150
3560  *         u"""Iterate over self and all siblings with the same tag.
3561  *         """
3562  *         parent = self.getparent()             # <<<<<<<<<<<<<<
3563  *         if parent is None:
3564  *             return iter([self])
3565  */
3566   __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)
3567   __Pyx_GOTREF(__pyx_t_2);
3568   __pyx_t_3 = NULL;
3569   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
3570     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3571     if (likely(__pyx_t_3)) {
3572       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3573       __Pyx_INCREF(__pyx_t_3);
3574       __Pyx_INCREF(function);
3575       __Pyx_DECREF_SET(__pyx_t_2, function);
3576     }
3577   }
3578   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
3579   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3580   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
3581   __Pyx_GOTREF(__pyx_t_1);
3582   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3583   __pyx_v_parent = __pyx_t_1;
3584   __pyx_t_1 = 0;
3585
3586   /* "lxml/objectify.pyx":151
3587  *         """
3588  *         parent = self.getparent()
3589  *         if parent is None:             # <<<<<<<<<<<<<<
3590  *             return iter([self])
3591  *         return etree.ElementChildIterator(parent, tag=self.tag)
3592  */
3593   __pyx_t_4 = (__pyx_v_parent == Py_None);
3594   __pyx_t_5 = (__pyx_t_4 != 0);
3595   if (__pyx_t_5) {
3596
3597     /* "lxml/objectify.pyx":152
3598  *         parent = self.getparent()
3599  *         if parent is None:
3600  *             return iter([self])             # <<<<<<<<<<<<<<
3601  *         return etree.ElementChildIterator(parent, tag=self.tag)
3602  * 
3603  */
3604     __Pyx_XDECREF(__pyx_r);
3605     __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
3606     __Pyx_GOTREF(__pyx_t_1);
3607     __Pyx_INCREF(((PyObject *)__pyx_v_self));
3608     __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
3609     PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
3610     __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
3611     __Pyx_GOTREF(__pyx_t_2);
3612     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3613     __pyx_r = __pyx_t_2;
3614     __pyx_t_2 = 0;
3615     goto __pyx_L0;
3616
3617     /* "lxml/objectify.pyx":151
3618  *         """
3619  *         parent = self.getparent()
3620  *         if parent is None:             # <<<<<<<<<<<<<<
3621  *             return iter([self])
3622  *         return etree.ElementChildIterator(parent, tag=self.tag)
3623  */
3624   }
3625
3626   /* "lxml/objectify.pyx":153
3627  *         if parent is None:
3628  *             return iter([self])
3629  *         return etree.ElementChildIterator(parent, tag=self.tag)             # <<<<<<<<<<<<<<
3630  * 
3631  *     def __str__(self):
3632  */
3633   __Pyx_XDECREF(__pyx_r);
3634   __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)
3635   __Pyx_GOTREF(__pyx_t_2);
3636   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
3637   __Pyx_GOTREF(__pyx_t_1);
3638   __Pyx_INCREF(__pyx_v_parent);
3639   __Pyx_GIVEREF(__pyx_v_parent);
3640   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_parent);
3641   __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
3642   __Pyx_GOTREF(__pyx_t_3);
3643   __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)
3644   __Pyx_GOTREF(__pyx_t_6);
3645   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tag, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
3646   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3647   __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)
3648   __Pyx_GOTREF(__pyx_t_6);
3649   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3650   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3651   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3652   __pyx_r = __pyx_t_6;
3653   __pyx_t_6 = 0;
3654   goto __pyx_L0;
3655
3656   /* "lxml/objectify.pyx":147
3657  *     subclasses.
3658  *     """
3659  *     def __iter__(self):             # <<<<<<<<<<<<<<
3660  *         u"""Iterate over self and all siblings with the same tag.
3661  *         """
3662  */
3663
3664   /* function exit code */
3665   __pyx_L1_error:;
3666   __Pyx_XDECREF(__pyx_t_1);
3667   __Pyx_XDECREF(__pyx_t_2);
3668   __Pyx_XDECREF(__pyx_t_3);
3669   __Pyx_XDECREF(__pyx_t_6);
3670   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3671   __pyx_r = NULL;
3672   __pyx_L0:;
3673   __Pyx_XDECREF(__pyx_v_parent);
3674   __Pyx_XGIVEREF(__pyx_r);
3675   __Pyx_RefNannyFinishContext();
3676   return __pyx_r;
3677 }
3678
3679 /* "lxml/objectify.pyx":155
3680  *         return etree.ElementChildIterator(parent, tag=self.tag)
3681  * 
3682  *     def __str__(self):             # <<<<<<<<<<<<<<
3683  *         if __RECURSIVE_STR:
3684  *             return _dump(self, 0)
3685  */
3686
3687 /* Python wrapper */
3688 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_3__str__(PyObject *__pyx_v_self); /*proto*/
3689 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_3__str__(PyObject *__pyx_v_self) {
3690   PyObject *__pyx_r = 0;
3691   __Pyx_RefNannyDeclarations
3692   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
3693   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_2__str__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3694
3695   /* function exit code */
3696   __Pyx_RefNannyFinishContext();
3697   return __pyx_r;
3698 }
3699
3700 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_2__str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3701   PyObject *__pyx_r = NULL;
3702   __Pyx_RefNannyDeclarations
3703   int __pyx_t_1;
3704   PyObject *__pyx_t_2 = NULL;
3705   PyObject *__pyx_t_3 = NULL;
3706   int __pyx_lineno = 0;
3707   const char *__pyx_filename = NULL;
3708   int __pyx_clineno = 0;
3709   __Pyx_RefNannySetupContext("__str__", 0);
3710
3711   /* "lxml/objectify.pyx":156
3712  * 
3713  *     def __str__(self):
3714  *         if __RECURSIVE_STR:             # <<<<<<<<<<<<<<
3715  *             return _dump(self, 0)
3716  *         else:
3717  */
3718   __pyx_t_1 = (__pyx_v_4lxml_9objectify___RECURSIVE_STR != 0);
3719   if (__pyx_t_1) {
3720
3721     /* "lxml/objectify.pyx":157
3722  *     def __str__(self):
3723  *         if __RECURSIVE_STR:
3724  *             return _dump(self, 0)             # <<<<<<<<<<<<<<
3725  *         else:
3726  *             return textOf(self._c_node) or u''
3727  */
3728     __Pyx_XDECREF(__pyx_r);
3729     __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)
3730     __Pyx_GOTREF(__pyx_t_2);
3731     __pyx_r = __pyx_t_2;
3732     __pyx_t_2 = 0;
3733     goto __pyx_L0;
3734
3735     /* "lxml/objectify.pyx":156
3736  * 
3737  *     def __str__(self):
3738  *         if __RECURSIVE_STR:             # <<<<<<<<<<<<<<
3739  *             return _dump(self, 0)
3740  *         else:
3741  */
3742   }
3743
3744   /* "lxml/objectify.pyx":159
3745  *             return _dump(self, 0)
3746  *         else:
3747  *             return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
3748  * 
3749  *     # pickle support for objectified Element
3750  */
3751   /*else*/ {
3752     __Pyx_XDECREF(__pyx_r);
3753     __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)
3754     __Pyx_GOTREF(__pyx_t_3);
3755     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
3756     if (!__pyx_t_1) {
3757       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3758     } else {
3759       __Pyx_INCREF(__pyx_t_3);
3760       __pyx_t_2 = __pyx_t_3;
3761       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3762       goto __pyx_L4_bool_binop_done;
3763     }
3764     __Pyx_INCREF(__pyx_kp_u_);
3765     __pyx_t_2 = __pyx_kp_u_;
3766     __pyx_L4_bool_binop_done:;
3767     __pyx_r = __pyx_t_2;
3768     __pyx_t_2 = 0;
3769     goto __pyx_L0;
3770   }
3771
3772   /* "lxml/objectify.pyx":155
3773  *         return etree.ElementChildIterator(parent, tag=self.tag)
3774  * 
3775  *     def __str__(self):             # <<<<<<<<<<<<<<
3776  *         if __RECURSIVE_STR:
3777  *             return _dump(self, 0)
3778  */
3779
3780   /* function exit code */
3781   __pyx_L1_error:;
3782   __Pyx_XDECREF(__pyx_t_2);
3783   __Pyx_XDECREF(__pyx_t_3);
3784   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3785   __pyx_r = NULL;
3786   __pyx_L0:;
3787   __Pyx_XGIVEREF(__pyx_r);
3788   __Pyx_RefNannyFinishContext();
3789   return __pyx_r;
3790 }
3791
3792 /* "lxml/objectify.pyx":162
3793  * 
3794  *     # pickle support for objectified Element
3795  *     def __reduce__(self):             # <<<<<<<<<<<<<<
3796  *         return fromstring, (etree.tostring(self),)
3797  * 
3798  */
3799
3800 /* Python wrapper */
3801 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3802 static PyMethodDef __pyx_mdef_4lxml_9objectify_18ObjectifiedElement_5__reduce__ = {"__reduce__", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__, METH_NOARGS, 0};
3803 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3804   PyObject *__pyx_r = 0;
3805   __Pyx_RefNannyDeclarations
3806   __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
3807   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3808
3809   /* function exit code */
3810   __Pyx_RefNannyFinishContext();
3811   return __pyx_r;
3812 }
3813
3814 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3815   PyObject *__pyx_r = NULL;
3816   __Pyx_RefNannyDeclarations
3817   PyObject *__pyx_t_1 = NULL;
3818   PyObject *__pyx_t_2 = NULL;
3819   PyObject *__pyx_t_3 = NULL;
3820   PyObject *__pyx_t_4 = NULL;
3821   int __pyx_lineno = 0;
3822   const char *__pyx_filename = NULL;
3823   int __pyx_clineno = 0;
3824   __Pyx_RefNannySetupContext("__reduce__", 0);
3825
3826   /* "lxml/objectify.pyx":163
3827  *     # pickle support for objectified Element
3828  *     def __reduce__(self):
3829  *         return fromstring, (etree.tostring(self),)             # <<<<<<<<<<<<<<
3830  * 
3831  *     @property
3832  */
3833   __Pyx_XDECREF(__pyx_r);
3834   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
3835   __Pyx_GOTREF(__pyx_t_1);
3836   __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)
3837   __Pyx_GOTREF(__pyx_t_3);
3838   __pyx_t_4 = NULL;
3839   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
3840     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3841     if (likely(__pyx_t_4)) {
3842       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3843       __Pyx_INCREF(__pyx_t_4);
3844       __Pyx_INCREF(function);
3845       __Pyx_DECREF_SET(__pyx_t_3, function);
3846     }
3847   }
3848   __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));
3849   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3850   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
3851   __Pyx_GOTREF(__pyx_t_2);
3852   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3853   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
3854   __Pyx_GOTREF(__pyx_t_3);
3855   __Pyx_GIVEREF(__pyx_t_2);
3856   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
3857   __pyx_t_2 = 0;
3858   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
3859   __Pyx_GOTREF(__pyx_t_2);
3860   __Pyx_GIVEREF(__pyx_t_1);
3861   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
3862   __Pyx_GIVEREF(__pyx_t_3);
3863   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
3864   __pyx_t_1 = 0;
3865   __pyx_t_3 = 0;
3866   __pyx_r = __pyx_t_2;
3867   __pyx_t_2 = 0;
3868   goto __pyx_L0;
3869
3870   /* "lxml/objectify.pyx":162
3871  * 
3872  *     # pickle support for objectified Element
3873  *     def __reduce__(self):             # <<<<<<<<<<<<<<
3874  *         return fromstring, (etree.tostring(self),)
3875  * 
3876  */
3877
3878   /* function exit code */
3879   __pyx_L1_error:;
3880   __Pyx_XDECREF(__pyx_t_1);
3881   __Pyx_XDECREF(__pyx_t_2);
3882   __Pyx_XDECREF(__pyx_t_3);
3883   __Pyx_XDECREF(__pyx_t_4);
3884   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3885   __pyx_r = NULL;
3886   __pyx_L0:;
3887   __Pyx_XGIVEREF(__pyx_r);
3888   __Pyx_RefNannyFinishContext();
3889   return __pyx_r;
3890 }
3891
3892 /* "lxml/objectify.pyx":166
3893  * 
3894  *     @property
3895  *     def text(self):             # <<<<<<<<<<<<<<
3896  *         return textOf(self._c_node)
3897  * 
3898  */
3899
3900 /* Python wrapper */
3901 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
3902 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_4text_1__get__(PyObject *__pyx_v_self) {
3903   PyObject *__pyx_r = 0;
3904   __Pyx_RefNannyDeclarations
3905   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3906   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3907
3908   /* function exit code */
3909   __Pyx_RefNannyFinishContext();
3910   return __pyx_r;
3911 }
3912
3913 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3914   PyObject *__pyx_r = NULL;
3915   __Pyx_RefNannyDeclarations
3916   PyObject *__pyx_t_1 = NULL;
3917   int __pyx_lineno = 0;
3918   const char *__pyx_filename = NULL;
3919   int __pyx_clineno = 0;
3920   __Pyx_RefNannySetupContext("__get__", 0);
3921
3922   /* "lxml/objectify.pyx":167
3923  *     @property
3924  *     def text(self):
3925  *         return textOf(self._c_node)             # <<<<<<<<<<<<<<
3926  * 
3927  *     @property
3928  */
3929   __Pyx_XDECREF(__pyx_r);
3930   __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)
3931   __Pyx_GOTREF(__pyx_t_1);
3932   __pyx_r = __pyx_t_1;
3933   __pyx_t_1 = 0;
3934   goto __pyx_L0;
3935
3936   /* "lxml/objectify.pyx":166
3937  * 
3938  *     @property
3939  *     def text(self):             # <<<<<<<<<<<<<<
3940  *         return textOf(self._c_node)
3941  * 
3942  */
3943
3944   /* function exit code */
3945   __pyx_L1_error:;
3946   __Pyx_XDECREF(__pyx_t_1);
3947   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.text.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3948   __pyx_r = NULL;
3949   __pyx_L0:;
3950   __Pyx_XGIVEREF(__pyx_r);
3951   __Pyx_RefNannyFinishContext();
3952   return __pyx_r;
3953 }
3954
3955 /* "lxml/objectify.pyx":170
3956  * 
3957  *     @property
3958  *     def __dict__(self):             # <<<<<<<<<<<<<<
3959  *         """A fake implementation for __dict__ to support dir() etc.
3960  * 
3961  */
3962
3963 /* Python wrapper */
3964 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_8__dict___1__get__(PyObject *__pyx_v_self); /*proto*/
3965 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_8__dict___1__get__(PyObject *__pyx_v_self) {
3966   PyObject *__pyx_r = 0;
3967   __Pyx_RefNannyDeclarations
3968   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3969   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3970
3971   /* function exit code */
3972   __Pyx_RefNannyFinishContext();
3973   return __pyx_r;
3974 }
3975
3976 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3977   struct LxmlElement *__pyx_v_child = 0;
3978   PyObject *__pyx_v_children = 0;
3979   const xmlChar *__pyx_v_c_ns;
3980   PyObject *__pyx_v_tag = NULL;
3981   PyObject *__pyx_v_name = NULL;
3982   PyObject *__pyx_r = NULL;
3983   __Pyx_RefNannyDeclarations
3984   PyObject *__pyx_t_1 = NULL;
3985   PyObject *__pyx_t_2 = NULL;
3986   PyObject *__pyx_t_3 = NULL;
3987   PyObject *__pyx_t_4 = NULL;
3988   Py_ssize_t __pyx_t_5;
3989   PyObject *(*__pyx_t_6)(PyObject *);
3990   int __pyx_t_7;
3991   int __pyx_t_8;
3992   int __pyx_lineno = 0;
3993   const char *__pyx_filename = NULL;
3994   int __pyx_clineno = 0;
3995   __Pyx_RefNannySetupContext("__get__", 0);
3996
3997   /* "lxml/objectify.pyx":177
3998  *         cdef _Element child
3999  *         cdef dict children
4000  *         c_ns = tree._getNs(self._c_node)             # <<<<<<<<<<<<<<
4001  *         tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
4002  *         children = {}
4003  */
4004   __pyx_v_c_ns = _getNs(__pyx_v_self->__pyx_base.__pyx_base._c_node);
4005
4006   /* "lxml/objectify.pyx":178
4007  *         cdef dict children
4008  *         c_ns = tree._getNs(self._c_node)
4009  *         tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None             # <<<<<<<<<<<<<<
4010  *         children = {}
4011  *         for child in etree.ElementChildIterator(self, tag=tag):
4012  */
4013   if (((__pyx_v_c_ns != NULL) != 0)) {
4014     __pyx_t_2 = pyunicode(__pyx_v_c_ns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
4015     __Pyx_GOTREF(__pyx_t_2);
4016     __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)
4017     __Pyx_GOTREF(__pyx_t_3);
4018     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4019     __pyx_t_1 = __pyx_t_3;
4020     __pyx_t_3 = 0;
4021   } else {
4022     __Pyx_INCREF(Py_None);
4023     __pyx_t_1 = Py_None;
4024   }
4025   __pyx_v_tag = __pyx_t_1;
4026   __pyx_t_1 = 0;
4027
4028   /* "lxml/objectify.pyx":179
4029  *         c_ns = tree._getNs(self._c_node)
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  */
4035   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
4036   __Pyx_GOTREF(__pyx_t_1);
4037   __pyx_v_children = ((PyObject*)__pyx_t_1);
4038   __pyx_t_1 = 0;
4039
4040   /* "lxml/objectify.pyx":180
4041  *         tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
4042  *         children = {}
4043  *         for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<<
4044  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
4045  *                 continue
4046  */
4047   __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)
4048   __Pyx_GOTREF(__pyx_t_1);
4049   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error)
4050   __Pyx_GOTREF(__pyx_t_3);
4051   __Pyx_INCREF(((PyObject *)__pyx_v_self));
4052   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4053   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
4054   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
4055   __Pyx_GOTREF(__pyx_t_2);
4056   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(0, 180, __pyx_L1_error)
4057   __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)
4058   __Pyx_GOTREF(__pyx_t_4);
4059   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4060   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4061   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4062   if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
4063     __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4064     __pyx_t_6 = NULL;
4065   } else {
4066     __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
4067     __Pyx_GOTREF(__pyx_t_2);
4068     __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error)
4069   }
4070   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4071   for (;;) {
4072     if (likely(!__pyx_t_6)) {
4073       if (likely(PyList_CheckExact(__pyx_t_2))) {
4074         if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4075         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4076         __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)
4077         #else
4078         __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)
4079         __Pyx_GOTREF(__pyx_t_4);
4080         #endif
4081       } else {
4082         if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4083         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4084         __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)
4085         #else
4086         __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)
4087         __Pyx_GOTREF(__pyx_t_4);
4088         #endif
4089       }
4090     } else {
4091       __pyx_t_4 = __pyx_t_6(__pyx_t_2);
4092       if (unlikely(!__pyx_t_4)) {
4093         PyObject* exc_type = PyErr_Occurred();
4094         if (exc_type) {
4095           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4096           else __PYX_ERR(0, 180, __pyx_L1_error)
4097         }
4098         break;
4099       }
4100       __Pyx_GOTREF(__pyx_t_4);
4101     }
4102     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)
4103     __Pyx_XDECREF_SET(__pyx_v_child, ((struct LxmlElement *)__pyx_t_4));
4104     __pyx_t_4 = 0;
4105
4106     /* "lxml/objectify.pyx":181
4107  *         children = {}
4108  *         for child in etree.ElementChildIterator(self, tag=tag):
4109  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:             # <<<<<<<<<<<<<<
4110  *                 continue
4111  *             name = pyunicode(child._c_node.name)
4112  */
4113     __pyx_t_8 = ((__pyx_v_c_ns == NULL) != 0);
4114     if (__pyx_t_8) {
4115     } else {
4116       __pyx_t_7 = __pyx_t_8;
4117       goto __pyx_L6_bool_binop_done;
4118     }
4119     __pyx_t_8 = ((_getNs(__pyx_v_child->_c_node) != NULL) != 0);
4120     __pyx_t_7 = __pyx_t_8;
4121     __pyx_L6_bool_binop_done:;
4122     if (__pyx_t_7) {
4123
4124       /* "lxml/objectify.pyx":182
4125  *         for child in etree.ElementChildIterator(self, tag=tag):
4126  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
4127  *                 continue             # <<<<<<<<<<<<<<
4128  *             name = pyunicode(child._c_node.name)
4129  *             if name not in children:
4130  */
4131       goto __pyx_L3_continue;
4132
4133       /* "lxml/objectify.pyx":181
4134  *         children = {}
4135  *         for child in etree.ElementChildIterator(self, tag=tag):
4136  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:             # <<<<<<<<<<<<<<
4137  *                 continue
4138  *             name = pyunicode(child._c_node.name)
4139  */
4140     }
4141
4142     /* "lxml/objectify.pyx":183
4143  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
4144  *                 continue
4145  *             name = pyunicode(child._c_node.name)             # <<<<<<<<<<<<<<
4146  *             if name not in children:
4147  *                 children[name] = child
4148  */
4149     __pyx_t_4 = pyunicode(__pyx_v_child->_c_node->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error)
4150     __Pyx_GOTREF(__pyx_t_4);
4151     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
4152     __pyx_t_4 = 0;
4153
4154     /* "lxml/objectify.pyx":184
4155  *                 continue
4156  *             name = pyunicode(child._c_node.name)
4157  *             if name not in children:             # <<<<<<<<<<<<<<
4158  *                 children[name] = child
4159  *         return children
4160  */
4161     __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)
4162     __pyx_t_8 = (__pyx_t_7 != 0);
4163     if (__pyx_t_8) {
4164
4165       /* "lxml/objectify.pyx":185
4166  *             name = pyunicode(child._c_node.name)
4167  *             if name not in children:
4168  *                 children[name] = child             # <<<<<<<<<<<<<<
4169  *         return children
4170  * 
4171  */
4172       if (unlikely(PyDict_SetItem(__pyx_v_children, __pyx_v_name, ((PyObject *)__pyx_v_child)) < 0)) __PYX_ERR(0, 185, __pyx_L1_error)
4173
4174       /* "lxml/objectify.pyx":184
4175  *                 continue
4176  *             name = pyunicode(child._c_node.name)
4177  *             if name not in children:             # <<<<<<<<<<<<<<
4178  *                 children[name] = child
4179  *         return children
4180  */
4181     }
4182
4183     /* "lxml/objectify.pyx":180
4184  *         tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
4185  *         children = {}
4186  *         for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<<
4187  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
4188  *                 continue
4189  */
4190     __pyx_L3_continue:;
4191   }
4192   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4193
4194   /* "lxml/objectify.pyx":186
4195  *             if name not in children:
4196  *                 children[name] = child
4197  *         return children             # <<<<<<<<<<<<<<
4198  * 
4199  *     def __len__(self):
4200  */
4201   __Pyx_XDECREF(__pyx_r);
4202   __Pyx_INCREF(__pyx_v_children);
4203   __pyx_r = __pyx_v_children;
4204   goto __pyx_L0;
4205
4206   /* "lxml/objectify.pyx":170
4207  * 
4208  *     @property
4209  *     def __dict__(self):             # <<<<<<<<<<<<<<
4210  *         """A fake implementation for __dict__ to support dir() etc.
4211  * 
4212  */
4213
4214   /* function exit code */
4215   __pyx_L1_error:;
4216   __Pyx_XDECREF(__pyx_t_1);
4217   __Pyx_XDECREF(__pyx_t_2);
4218   __Pyx_XDECREF(__pyx_t_3);
4219   __Pyx_XDECREF(__pyx_t_4);
4220   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__dict__.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4221   __pyx_r = NULL;
4222   __pyx_L0:;
4223   __Pyx_XDECREF((PyObject *)__pyx_v_child);
4224   __Pyx_XDECREF(__pyx_v_children);
4225   __Pyx_XDECREF(__pyx_v_tag);
4226   __Pyx_XDECREF(__pyx_v_name);
4227   __Pyx_XGIVEREF(__pyx_r);
4228   __Pyx_RefNannyFinishContext();
4229   return __pyx_r;
4230 }
4231
4232 /* "lxml/objectify.pyx":188
4233  *         return children
4234  * 
4235  *     def __len__(self):             # <<<<<<<<<<<<<<
4236  *         u"""Count self and siblings with the same tag.
4237  *         """
4238  */
4239
4240 /* Python wrapper */
4241 static Py_ssize_t __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__(PyObject *__pyx_v_self); /*proto*/
4242 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_6__len__[] = "Count self and siblings with the same tag.\n        ";
4243 #if CYTHON_COMPILING_IN_CPYTHON
4244 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__;
4245 #endif
4246 static Py_ssize_t __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__(PyObject *__pyx_v_self) {
4247   Py_ssize_t __pyx_r;
4248   __Pyx_RefNannyDeclarations
4249   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
4250   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
4251
4252   /* function exit code */
4253   __Pyx_RefNannyFinishContext();
4254   return __pyx_r;
4255 }
4256
4257 static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
4258   Py_ssize_t __pyx_r;
4259   __Pyx_RefNannyDeclarations
4260   __Pyx_RefNannySetupContext("__len__", 0);
4261
4262   /* "lxml/objectify.pyx":191
4263  *         u"""Count self and siblings with the same tag.
4264  *         """
4265  *         return _countSiblings(self._c_node)             # <<<<<<<<<<<<<<
4266  * 
4267  *     def countchildren(self):
4268  */
4269   __pyx_r = __pyx_f_4lxml_9objectify__countSiblings(__pyx_v_self->__pyx_base.__pyx_base._c_node);
4270   goto __pyx_L0;
4271
4272   /* "lxml/objectify.pyx":188
4273  *         return children
4274  * 
4275  *     def __len__(self):             # <<<<<<<<<<<<<<
4276  *         u"""Count self and siblings with the same tag.
4277  *         """
4278  */
4279
4280   /* function exit code */
4281   __pyx_L0:;
4282   __Pyx_RefNannyFinishContext();
4283   return __pyx_r;
4284 }
4285
4286 /* "lxml/objectify.pyx":193
4287  *         return _countSiblings(self._c_node)
4288  * 
4289  *     def countchildren(self):             # <<<<<<<<<<<<<<
4290  *         u"""countchildren(self)
4291  * 
4292  */
4293
4294 /* Python wrapper */
4295 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4296 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        ";
4297 static PyMethodDef __pyx_mdef_4lxml_9objectify_18ObjectifiedElement_9countchildren = {"countchildren", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_8countchildren};
4298 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4299   PyObject *__pyx_r = 0;
4300   __Pyx_RefNannyDeclarations
4301   __Pyx_RefNannySetupContext("countchildren (wrapper)", 0);
4302   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8countchildren(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
4303
4304   /* function exit code */
4305   __Pyx_RefNannyFinishContext();
4306   return __pyx_r;
4307 }
4308
4309 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8countchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
4310   Py_ssize_t __pyx_v_c;
4311   xmlNode *__pyx_v_c_node;
4312   PyObject *__pyx_r = NULL;
4313   __Pyx_RefNannyDeclarations
4314   xmlNode *__pyx_t_1;
4315   int __pyx_t_2;
4316   PyObject *__pyx_t_3 = NULL;
4317   int __pyx_lineno = 0;
4318   const char *__pyx_filename = NULL;
4319   int __pyx_clineno = 0;
4320   __Pyx_RefNannySetupContext("countchildren", 0);
4321
4322   /* "lxml/objectify.pyx":202
4323  *         cdef Py_ssize_t c
4324  *         cdef tree.xmlNode* c_node
4325  *         c = 0             # <<<<<<<<<<<<<<
4326  *         c_node = self._c_node.children
4327  *         while c_node is not NULL:
4328  */
4329   __pyx_v_c = 0;
4330
4331   /* "lxml/objectify.pyx":203
4332  *         cdef tree.xmlNode* c_node
4333  *         c = 0
4334  *         c_node = self._c_node.children             # <<<<<<<<<<<<<<
4335  *         while c_node is not NULL:
4336  *             if tree._isElement(c_node):
4337  */
4338   __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base._c_node->children;
4339   __pyx_v_c_node = __pyx_t_1;
4340
4341   /* "lxml/objectify.pyx":204
4342  *         c = 0
4343  *         c_node = self._c_node.children
4344  *         while c_node is not NULL:             # <<<<<<<<<<<<<<
4345  *             if tree._isElement(c_node):
4346  *                 c += 1
4347  */
4348   while (1) {
4349     __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0);
4350     if (!__pyx_t_2) break;
4351
4352     /* "lxml/objectify.pyx":205
4353  *         c_node = self._c_node.children
4354  *         while c_node is not NULL:
4355  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
4356  *                 c += 1
4357  *             c_node = c_node.next
4358  */
4359     __pyx_t_2 = (_isElement(__pyx_v_c_node) != 0);
4360     if (__pyx_t_2) {
4361
4362       /* "lxml/objectify.pyx":206
4363  *         while c_node is not NULL:
4364  *             if tree._isElement(c_node):
4365  *                 c += 1             # <<<<<<<<<<<<<<
4366  *             c_node = c_node.next
4367  *         return c
4368  */
4369       __pyx_v_c = (__pyx_v_c + 1);
4370
4371       /* "lxml/objectify.pyx":205
4372  *         c_node = self._c_node.children
4373  *         while c_node is not NULL:
4374  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
4375  *                 c += 1
4376  *             c_node = c_node.next
4377  */
4378     }
4379
4380     /* "lxml/objectify.pyx":207
4381  *             if tree._isElement(c_node):
4382  *                 c += 1
4383  *             c_node = c_node.next             # <<<<<<<<<<<<<<
4384  *         return c
4385  * 
4386  */
4387     __pyx_t_1 = __pyx_v_c_node->next;
4388     __pyx_v_c_node = __pyx_t_1;
4389   }
4390
4391   /* "lxml/objectify.pyx":208
4392  *                 c += 1
4393  *             c_node = c_node.next
4394  *         return c             # <<<<<<<<<<<<<<
4395  * 
4396  *     def getchildren(self):
4397  */
4398   __Pyx_XDECREF(__pyx_r);
4399   __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error)
4400   __Pyx_GOTREF(__pyx_t_3);
4401   __pyx_r = __pyx_t_3;
4402   __pyx_t_3 = 0;
4403   goto __pyx_L0;
4404
4405   /* "lxml/objectify.pyx":193
4406  *         return _countSiblings(self._c_node)
4407  * 
4408  *     def countchildren(self):             # <<<<<<<<<<<<<<
4409  *         u"""countchildren(self)
4410  * 
4411  */
4412
4413   /* function exit code */
4414   __pyx_L1_error:;
4415   __Pyx_XDECREF(__pyx_t_3);
4416   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.countchildren", __pyx_clineno, __pyx_lineno, __pyx_filename);
4417   __pyx_r = NULL;
4418   __pyx_L0:;
4419   __Pyx_XGIVEREF(__pyx_r);
4420   __Pyx_RefNannyFinishContext();
4421   return __pyx_r;
4422 }
4423
4424 /* "lxml/objectify.pyx":210
4425  *         return c
4426  * 
4427  *     def getchildren(self):             # <<<<<<<<<<<<<<
4428  *         u"""getchildren(self)
4429  * 
4430  */
4431
4432 /* Python wrapper */
4433 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4434 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        ";
4435 static PyMethodDef __pyx_mdef_4lxml_9objectify_18ObjectifiedElement_11getchildren = {"getchildren", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_10getchildren};
4436 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4437   PyObject *__pyx_r = 0;
4438   __Pyx_RefNannyDeclarations
4439   __Pyx_RefNannySetupContext("getchildren (wrapper)", 0);
4440   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_10getchildren(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
4441
4442   /* function exit code */
4443   __Pyx_RefNannyFinishContext();
4444   return __pyx_r;
4445 }
4446
4447 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_10getchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
4448   xmlNode *__pyx_v_c_node;
4449   PyObject *__pyx_v_result = NULL;
4450   PyObject *__pyx_r = NULL;
4451   __Pyx_RefNannyDeclarations
4452   PyObject *__pyx_t_1 = NULL;
4453   xmlNode *__pyx_t_2;
4454   int __pyx_t_3;
4455   PyObject *__pyx_t_4 = NULL;
4456   int __pyx_t_5;
4457   int __pyx_lineno = 0;
4458   const char *__pyx_filename = NULL;
4459   int __pyx_clineno = 0;
4460   __Pyx_RefNannySetupContext("getchildren", 0);
4461
4462   /* "lxml/objectify.pyx":217
4463  *         """
4464  *         cdef tree.xmlNode* c_node
4465  *         result = []             # <<<<<<<<<<<<<<
4466  *         c_node = self._c_node.children
4467  *         while c_node is not NULL:
4468  */
4469   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
4470   __Pyx_GOTREF(__pyx_t_1);
4471   __pyx_v_result = ((PyObject*)__pyx_t_1);
4472   __pyx_t_1 = 0;
4473
4474   /* "lxml/objectify.pyx":218
4475  *         cdef tree.xmlNode* c_node
4476  *         result = []
4477  *         c_node = self._c_node.children             # <<<<<<<<<<<<<<
4478  *         while c_node is not NULL:
4479  *             if tree._isElement(c_node):
4480  */
4481   __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base._c_node->children;
4482   __pyx_v_c_node = __pyx_t_2;
4483
4484   /* "lxml/objectify.pyx":219
4485  *         result = []
4486  *         c_node = self._c_node.children
4487  *         while c_node is not NULL:             # <<<<<<<<<<<<<<
4488  *             if tree._isElement(c_node):
4489  *                 result.append(cetree.elementFactory(self._doc, c_node))
4490  */
4491   while (1) {
4492     __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0);
4493     if (!__pyx_t_3) break;
4494
4495     /* "lxml/objectify.pyx":220
4496  *         c_node = self._c_node.children
4497  *         while c_node is not NULL:
4498  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
4499  *                 result.append(cetree.elementFactory(self._doc, c_node))
4500  *             c_node = c_node.next
4501  */
4502     __pyx_t_3 = (_isElement(__pyx_v_c_node) != 0);
4503     if (__pyx_t_3) {
4504
4505       /* "lxml/objectify.pyx":221
4506  *         while c_node is not NULL:
4507  *             if tree._isElement(c_node):
4508  *                 result.append(cetree.elementFactory(self._doc, c_node))             # <<<<<<<<<<<<<<
4509  *             c_node = c_node.next
4510  *         return result
4511  */
4512       __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._doc);
4513       __Pyx_INCREF(__pyx_t_1);
4514       __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)
4515       __Pyx_GOTREF(__pyx_t_4);
4516       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4517       __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)
4518       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4519
4520       /* "lxml/objectify.pyx":220
4521  *         c_node = self._c_node.children
4522  *         while c_node is not NULL:
4523  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
4524  *                 result.append(cetree.elementFactory(self._doc, c_node))
4525  *             c_node = c_node.next
4526  */
4527     }
4528
4529     /* "lxml/objectify.pyx":222
4530  *             if tree._isElement(c_node):
4531  *                 result.append(cetree.elementFactory(self._doc, c_node))
4532  *             c_node = c_node.next             # <<<<<<<<<<<<<<
4533  *         return result
4534  * 
4535  */
4536     __pyx_t_2 = __pyx_v_c_node->next;
4537     __pyx_v_c_node = __pyx_t_2;
4538   }
4539
4540   /* "lxml/objectify.pyx":223
4541  *                 result.append(cetree.elementFactory(self._doc, c_node))
4542  *             c_node = c_node.next
4543  *         return result             # <<<<<<<<<<<<<<
4544  * 
4545  *     def __getattr__(self, tag):
4546  */
4547   __Pyx_XDECREF(__pyx_r);
4548   __Pyx_INCREF(__pyx_v_result);
4549   __pyx_r = __pyx_v_result;
4550   goto __pyx_L0;
4551
4552   /* "lxml/objectify.pyx":210
4553  *         return c
4554  * 
4555  *     def getchildren(self):             # <<<<<<<<<<<<<<
4556  *         u"""getchildren(self)
4557  * 
4558  */
4559
4560   /* function exit code */
4561   __pyx_L1_error:;
4562   __Pyx_XDECREF(__pyx_t_1);
4563   __Pyx_XDECREF(__pyx_t_4);
4564   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.getchildren", __pyx_clineno, __pyx_lineno, __pyx_filename);
4565   __pyx_r = NULL;
4566   __pyx_L0:;
4567   __Pyx_XDECREF(__pyx_v_result);
4568   __Pyx_XGIVEREF(__pyx_r);
4569   __Pyx_RefNannyFinishContext();
4570   return __pyx_r;
4571 }
4572
4573 /* "lxml/objectify.pyx":225
4574  *         return result
4575  * 
4576  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
4577  *         u"""Return the (first) child with the given tag name.  If no namespace
4578  *         is provided, the child will be looked up in the same one as self.
4579  */
4580
4581 /* Python wrapper */
4582 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
4583 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        ";
4584 #if CYTHON_COMPILING_IN_CPYTHON
4585 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__;
4586 #endif
4587 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
4588   PyObject *__pyx_r = 0;
4589   __Pyx_RefNannyDeclarations
4590   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
4591   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_12__getattr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
4592
4593   /* function exit code */
4594   __Pyx_RefNannyFinishContext();
4595   return __pyx_r;
4596 }
4597
4598 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_12__getattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag) {
4599   PyObject *__pyx_r = NULL;
4600   __Pyx_RefNannyDeclarations
4601   PyObject *__pyx_t_1 = NULL;
4602   PyObject *__pyx_t_2 = NULL;
4603   PyObject *__pyx_t_3 = NULL;
4604   int __pyx_t_4;
4605   int __pyx_t_5;
4606   PyObject *__pyx_t_6 = NULL;
4607   int __pyx_lineno = 0;
4608   const char *__pyx_filename = NULL;
4609   int __pyx_clineno = 0;
4610   __Pyx_RefNannySetupContext("__getattr__", 0);
4611
4612   /* "lxml/objectify.pyx":229
4613  *         is provided, the child will be looked up in the same one as self.
4614  *         """
4615  *         if is_special_method(tag):             # <<<<<<<<<<<<<<
4616  *             return object.__getattr__(self, tag)
4617  *         return _lookupChildOrRaise(self, tag)
4618  */
4619   __Pyx_INCREF(__pyx_v_4lxml_9objectify_is_special_method);
4620   __pyx_t_2 = __pyx_v_4lxml_9objectify_is_special_method; __pyx_t_3 = NULL;
4621   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4622     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4623     if (likely(__pyx_t_3)) {
4624       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4625       __Pyx_INCREF(__pyx_t_3);
4626       __Pyx_INCREF(function);
4627       __Pyx_DECREF_SET(__pyx_t_2, function);
4628     }
4629   }
4630   __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);
4631   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4632   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
4633   __Pyx_GOTREF(__pyx_t_1);
4634   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4635   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 229, __pyx_L1_error)
4636   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4637   if (__pyx_t_4) {
4638
4639     /* "lxml/objectify.pyx":230
4640  *         """
4641  *         if is_special_method(tag):
4642  *             return object.__getattr__(self, tag)             # <<<<<<<<<<<<<<
4643  *         return _lookupChildOrRaise(self, tag)
4644  * 
4645  */
4646     __Pyx_XDECREF(__pyx_r);
4647     __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)
4648     __Pyx_GOTREF(__pyx_t_2);
4649     __pyx_t_3 = NULL;
4650     __pyx_t_5 = 0;
4651     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4652       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4653       if (likely(__pyx_t_3)) {
4654         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4655         __Pyx_INCREF(__pyx_t_3);
4656         __Pyx_INCREF(function);
4657         __Pyx_DECREF_SET(__pyx_t_2, function);
4658         __pyx_t_5 = 1;
4659       }
4660     }
4661     #if CYTHON_FAST_PYCALL
4662     if (PyFunction_Check(__pyx_t_2)) {
4663       PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_tag};
4664       __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)
4665       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4666       __Pyx_GOTREF(__pyx_t_1);
4667     } else
4668     #endif
4669     #if CYTHON_FAST_PYCCALL
4670     if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
4671       PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_tag};
4672       __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)
4673       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4674       __Pyx_GOTREF(__pyx_t_1);
4675     } else
4676     #endif
4677     {
4678       __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
4679       __Pyx_GOTREF(__pyx_t_6);
4680       if (__pyx_t_3) {
4681         __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
4682       }
4683       __Pyx_INCREF(((PyObject *)__pyx_v_self));
4684       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4685       PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_self));
4686       __Pyx_INCREF(__pyx_v_tag);
4687       __Pyx_GIVEREF(__pyx_v_tag);
4688       PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_tag);
4689       __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)
4690       __Pyx_GOTREF(__pyx_t_1);
4691       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4692     }
4693     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4694     __pyx_r = __pyx_t_1;
4695     __pyx_t_1 = 0;
4696     goto __pyx_L0;
4697
4698     /* "lxml/objectify.pyx":229
4699  *         is provided, the child will be looked up in the same one as self.
4700  *         """
4701  *         if is_special_method(tag):             # <<<<<<<<<<<<<<
4702  *             return object.__getattr__(self, tag)
4703  *         return _lookupChildOrRaise(self, tag)
4704  */
4705   }
4706
4707   /* "lxml/objectify.pyx":231
4708  *         if is_special_method(tag):
4709  *             return object.__getattr__(self, tag)
4710  *         return _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<<
4711  * 
4712  *     def __setattr__(self, tag, value):
4713  */
4714   __Pyx_XDECREF(__pyx_r);
4715   __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)
4716   __Pyx_GOTREF(__pyx_t_1);
4717   __pyx_r = __pyx_t_1;
4718   __pyx_t_1 = 0;
4719   goto __pyx_L0;
4720
4721   /* "lxml/objectify.pyx":225
4722  *         return result
4723  * 
4724  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
4725  *         u"""Return the (first) child with the given tag name.  If no namespace
4726  *         is provided, the child will be looked up in the same one as self.
4727  */
4728
4729   /* function exit code */
4730   __pyx_L1_error:;
4731   __Pyx_XDECREF(__pyx_t_1);
4732   __Pyx_XDECREF(__pyx_t_2);
4733   __Pyx_XDECREF(__pyx_t_3);
4734   __Pyx_XDECREF(__pyx_t_6);
4735   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4736   __pyx_r = NULL;
4737   __pyx_L0:;
4738   __Pyx_XGIVEREF(__pyx_r);
4739   __Pyx_RefNannyFinishContext();
4740   return __pyx_r;
4741 }
4742
4743 /* "lxml/objectify.pyx":233
4744  *         return _lookupChildOrRaise(self, tag)
4745  * 
4746  *     def __setattr__(self, tag, value):             # <<<<<<<<<<<<<<
4747  *         u"""Set the value of the (first) child with the given tag name.  If no
4748  *         namespace is provided, the child will be looked up in the same one as
4749  */
4750
4751 /* Python wrapper */
4752 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_15__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /*proto*/
4753 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        ";
4754 #if CYTHON_COMPILING_IN_CPYTHON
4755 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__;
4756 #endif
4757 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_15__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
4758   int __pyx_r;
4759   __Pyx_RefNannyDeclarations
4760   __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
4761   __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));
4762
4763   /* function exit code */
4764   __Pyx_RefNannyFinishContext();
4765   return __pyx_r;
4766 }
4767
4768 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) {
4769   struct LxmlElement *__pyx_v_element = 0;
4770   int __pyx_r;
4771   __Pyx_RefNannyDeclarations
4772   int __pyx_t_1;
4773   int __pyx_t_2;
4774   PyObject *__pyx_t_3 = NULL;
4775   Py_ssize_t __pyx_t_4;
4776   Py_UCS4 __pyx_t_5;
4777   PyObject *__pyx_t_6 = NULL;
4778   PyObject *__pyx_t_7 = NULL;
4779   int __pyx_t_8;
4780   PyObject *__pyx_t_9 = NULL;
4781   int __pyx_lineno = 0;
4782   const char *__pyx_filename = NULL;
4783   int __pyx_clineno = 0;
4784   __Pyx_RefNannySetupContext("__setattr__", 0);
4785   __Pyx_INCREF(__pyx_v_tag);
4786
4787   /* "lxml/objectify.pyx":240
4788  *         cdef _Element element
4789  *         # properties are looked up /after/ __setattr__, so we must emulate them
4790  *         if tag == u'text' or tag == u'pyval':             # <<<<<<<<<<<<<<
4791  *             # read-only !
4792  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4793  */
4794   __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)
4795   if (!__pyx_t_2) {
4796   } else {
4797     __pyx_t_1 = __pyx_t_2;
4798     goto __pyx_L4_bool_binop_done;
4799   }
4800   __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)
4801   __pyx_t_1 = __pyx_t_2;
4802   __pyx_L4_bool_binop_done:;
4803   if (unlikely(__pyx_t_1)) {
4804
4805     /* "lxml/objectify.pyx":242
4806  *         if tag == u'text' or tag == u'pyval':
4807  *             # read-only !
4808  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"             # <<<<<<<<<<<<<<
4809  *         elif tag == u'tail':
4810  *             cetree.setTailText(self._c_node, value)
4811  */
4812     __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
4813     __Pyx_GOTREF(__pyx_t_3);
4814     __pyx_t_4 = 0;
4815     __pyx_t_5 = 127;
4816     __Pyx_INCREF(__pyx_kp_u_attribute);
4817     __pyx_t_4 += 11;
4818     __Pyx_GIVEREF(__pyx_kp_u_attribute);
4819     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_attribute);
4820     __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_tag, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error)
4821     __Pyx_GOTREF(__pyx_t_6);
4822     __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;
4823     __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
4824     __Pyx_GIVEREF(__pyx_t_6);
4825     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
4826     __pyx_t_6 = 0;
4827     __Pyx_INCREF(__pyx_kp_u_of);
4828     __pyx_t_4 += 6;
4829     __Pyx_GIVEREF(__pyx_kp_u_of);
4830     PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_of);
4831     __pyx_t_6 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error)
4832     __Pyx_GOTREF(__pyx_t_6);
4833     __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error)
4834     __Pyx_GOTREF(__pyx_t_7);
4835     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4836     __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;
4837     __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
4838     __Pyx_GIVEREF(__pyx_t_7);
4839     PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7);
4840     __pyx_t_7 = 0;
4841     __Pyx_INCREF(__pyx_kp_u_objects_is_not_writable);
4842     __pyx_t_4 += 25;
4843     __Pyx_GIVEREF(__pyx_kp_u_objects_is_not_writable);
4844     PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_objects_is_not_writable);
4845     __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)
4846     __Pyx_GOTREF(__pyx_t_7);
4847     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4848     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0);
4849     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4850     __PYX_ERR(0, 242, __pyx_L1_error)
4851
4852     /* "lxml/objectify.pyx":240
4853  *         cdef _Element element
4854  *         # properties are looked up /after/ __setattr__, so we must emulate them
4855  *         if tag == u'text' or tag == u'pyval':             # <<<<<<<<<<<<<<
4856  *             # read-only !
4857  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4858  */
4859   }
4860
4861   /* "lxml/objectify.pyx":243
4862  *             # read-only !
4863  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4864  *         elif tag == u'tail':             # <<<<<<<<<<<<<<
4865  *             cetree.setTailText(self._c_node, value)
4866  *             return
4867  */
4868   __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)
4869   if (__pyx_t_1) {
4870
4871     /* "lxml/objectify.pyx":244
4872  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4873  *         elif tag == u'tail':
4874  *             cetree.setTailText(self._c_node, value)             # <<<<<<<<<<<<<<
4875  *             return
4876  *         elif tag == u'tag':
4877  */
4878     __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)
4879
4880     /* "lxml/objectify.pyx":245
4881  *         elif tag == u'tail':
4882  *             cetree.setTailText(self._c_node, value)
4883  *             return             # <<<<<<<<<<<<<<
4884  *         elif tag == u'tag':
4885  *             ElementBase.tag.__set__(self, value)
4886  */
4887     __pyx_r = 0;
4888     goto __pyx_L0;
4889
4890     /* "lxml/objectify.pyx":243
4891  *             # read-only !
4892  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4893  *         elif tag == u'tail':             # <<<<<<<<<<<<<<
4894  *             cetree.setTailText(self._c_node, value)
4895  *             return
4896  */
4897   }
4898
4899   /* "lxml/objectify.pyx":246
4900  *             cetree.setTailText(self._c_node, value)
4901  *             return
4902  *         elif tag == u'tag':             # <<<<<<<<<<<<<<
4903  *             ElementBase.tag.__set__(self, value)
4904  *             return
4905  */
4906   __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)
4907   if (__pyx_t_1) {
4908
4909     /* "lxml/objectify.pyx":247
4910  *             return
4911  *         elif tag == u'tag':
4912  *             ElementBase.tag.__set__(self, value)             # <<<<<<<<<<<<<<
4913  *             return
4914  *         elif tag == u'base':
4915  */
4916     __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)
4917     __Pyx_GOTREF(__pyx_t_3);
4918     __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)
4919     __Pyx_GOTREF(__pyx_t_6);
4920     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4921     __pyx_t_3 = NULL;
4922     __pyx_t_8 = 0;
4923     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
4924       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
4925       if (likely(__pyx_t_3)) {
4926         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
4927         __Pyx_INCREF(__pyx_t_3);
4928         __Pyx_INCREF(function);
4929         __Pyx_DECREF_SET(__pyx_t_6, function);
4930         __pyx_t_8 = 1;
4931       }
4932     }
4933     #if CYTHON_FAST_PYCALL
4934     if (PyFunction_Check(__pyx_t_6)) {
4935       PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_value};
4936       __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)
4937       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4938       __Pyx_GOTREF(__pyx_t_7);
4939     } else
4940     #endif
4941     #if CYTHON_FAST_PYCCALL
4942     if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
4943       PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_value};
4944       __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)
4945       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4946       __Pyx_GOTREF(__pyx_t_7);
4947     } else
4948     #endif
4949     {
4950       __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 247, __pyx_L1_error)
4951       __Pyx_GOTREF(__pyx_t_9);
4952       if (__pyx_t_3) {
4953         __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL;
4954       }
4955       __Pyx_INCREF(((PyObject *)__pyx_v_self));
4956       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4957       PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
4958       __Pyx_INCREF(__pyx_v_value);
4959       __Pyx_GIVEREF(__pyx_v_value);
4960       PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_value);
4961       __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)
4962       __Pyx_GOTREF(__pyx_t_7);
4963       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4964     }
4965     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4966     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4967
4968     /* "lxml/objectify.pyx":248
4969  *         elif tag == u'tag':
4970  *             ElementBase.tag.__set__(self, value)
4971  *             return             # <<<<<<<<<<<<<<
4972  *         elif tag == u'base':
4973  *             ElementBase.base.__set__(self, value)
4974  */
4975     __pyx_r = 0;
4976     goto __pyx_L0;
4977
4978     /* "lxml/objectify.pyx":246
4979  *             cetree.setTailText(self._c_node, value)
4980  *             return
4981  *         elif tag == u'tag':             # <<<<<<<<<<<<<<
4982  *             ElementBase.tag.__set__(self, value)
4983  *             return
4984  */
4985   }
4986
4987   /* "lxml/objectify.pyx":249
4988  *             ElementBase.tag.__set__(self, value)
4989  *             return
4990  *         elif tag == u'base':             # <<<<<<<<<<<<<<
4991  *             ElementBase.base.__set__(self, value)
4992  *             return
4993  */
4994   __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)
4995   if (__pyx_t_1) {
4996
4997     /* "lxml/objectify.pyx":250
4998  *             return
4999  *         elif tag == u'base':
5000  *             ElementBase.base.__set__(self, value)             # <<<<<<<<<<<<<<
5001  *             return
5002  *         tag = _buildChildTag(self, tag)
5003  */
5004     __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)
5005     __Pyx_GOTREF(__pyx_t_6);
5006     __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)
5007     __Pyx_GOTREF(__pyx_t_9);
5008     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5009     __pyx_t_6 = NULL;
5010     __pyx_t_8 = 0;
5011     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
5012       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
5013       if (likely(__pyx_t_6)) {
5014         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
5015         __Pyx_INCREF(__pyx_t_6);
5016         __Pyx_INCREF(function);
5017         __Pyx_DECREF_SET(__pyx_t_9, function);
5018         __pyx_t_8 = 1;
5019       }
5020     }
5021     #if CYTHON_FAST_PYCALL
5022     if (PyFunction_Check(__pyx_t_9)) {
5023       PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_value};
5024       __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)
5025       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5026       __Pyx_GOTREF(__pyx_t_7);
5027     } else
5028     #endif
5029     #if CYTHON_FAST_PYCCALL
5030     if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
5031       PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_value};
5032       __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)
5033       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5034       __Pyx_GOTREF(__pyx_t_7);
5035     } else
5036     #endif
5037     {
5038       __pyx_t_3 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
5039       __Pyx_GOTREF(__pyx_t_3);
5040       if (__pyx_t_6) {
5041         __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
5042       }
5043       __Pyx_INCREF(((PyObject *)__pyx_v_self));
5044       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
5045       PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
5046       __Pyx_INCREF(__pyx_v_value);
5047       __Pyx_GIVEREF(__pyx_v_value);
5048       PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_v_value);
5049       __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)
5050       __Pyx_GOTREF(__pyx_t_7);
5051       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5052     }
5053     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5054     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5055
5056     /* "lxml/objectify.pyx":251
5057  *         elif tag == u'base':
5058  *             ElementBase.base.__set__(self, value)
5059  *             return             # <<<<<<<<<<<<<<
5060  *         tag = _buildChildTag(self, tag)
5061  *         element = _lookupChild(self, tag)
5062  */
5063     __pyx_r = 0;
5064     goto __pyx_L0;
5065
5066     /* "lxml/objectify.pyx":249
5067  *             ElementBase.tag.__set__(self, value)
5068  *             return
5069  *         elif tag == u'base':             # <<<<<<<<<<<<<<
5070  *             ElementBase.base.__set__(self, value)
5071  *             return
5072  */
5073   }
5074
5075   /* "lxml/objectify.pyx":252
5076  *             ElementBase.base.__set__(self, value)
5077  *             return
5078  *         tag = _buildChildTag(self, tag)             # <<<<<<<<<<<<<<
5079  *         element = _lookupChild(self, tag)
5080  *         if element is None:
5081  */
5082   __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)
5083   __Pyx_GOTREF(__pyx_t_7);
5084   __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_7);
5085   __pyx_t_7 = 0;
5086
5087   /* "lxml/objectify.pyx":253
5088  *             return
5089  *         tag = _buildChildTag(self, tag)
5090  *         element = _lookupChild(self, tag)             # <<<<<<<<<<<<<<
5091  *         if element is None:
5092  *             _appendValue(self, tag, value)
5093  */
5094   __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)
5095   __Pyx_GOTREF(__pyx_t_7);
5096   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)
5097   __pyx_v_element = ((struct LxmlElement *)__pyx_t_7);
5098   __pyx_t_7 = 0;
5099
5100   /* "lxml/objectify.pyx":254
5101  *         tag = _buildChildTag(self, tag)
5102  *         element = _lookupChild(self, tag)
5103  *         if element is None:             # <<<<<<<<<<<<<<
5104  *             _appendValue(self, tag, value)
5105  *         else:
5106  */
5107   __pyx_t_1 = (((PyObject *)__pyx_v_element) == Py_None);
5108   __pyx_t_2 = (__pyx_t_1 != 0);
5109   if (__pyx_t_2) {
5110
5111     /* "lxml/objectify.pyx":255
5112  *         element = _lookupChild(self, tag)
5113  *         if element is None:
5114  *             _appendValue(self, tag, value)             # <<<<<<<<<<<<<<
5115  *         else:
5116  *             _replaceElement(element, value)
5117  */
5118     __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)
5119     __Pyx_GOTREF(__pyx_t_7);
5120     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5121
5122     /* "lxml/objectify.pyx":254
5123  *         tag = _buildChildTag(self, tag)
5124  *         element = _lookupChild(self, tag)
5125  *         if element is None:             # <<<<<<<<<<<<<<
5126  *             _appendValue(self, tag, value)
5127  *         else:
5128  */
5129     goto __pyx_L6;
5130   }
5131
5132   /* "lxml/objectify.pyx":257
5133  *             _appendValue(self, tag, value)
5134  *         else:
5135  *             _replaceElement(element, value)             # <<<<<<<<<<<<<<
5136  * 
5137  *     def __delattr__(self, tag):
5138  */
5139   /*else*/ {
5140     __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)
5141     __Pyx_GOTREF(__pyx_t_7);
5142     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5143   }
5144   __pyx_L6:;
5145
5146   /* "lxml/objectify.pyx":233
5147  *         return _lookupChildOrRaise(self, tag)
5148  * 
5149  *     def __setattr__(self, tag, value):             # <<<<<<<<<<<<<<
5150  *         u"""Set the value of the (first) child with the given tag name.  If no
5151  *         namespace is provided, the child will be looked up in the same one as
5152  */
5153
5154   /* function exit code */
5155   __pyx_r = 0;
5156   goto __pyx_L0;
5157   __pyx_L1_error:;
5158   __Pyx_XDECREF(__pyx_t_3);
5159   __Pyx_XDECREF(__pyx_t_6);
5160   __Pyx_XDECREF(__pyx_t_7);
5161   __Pyx_XDECREF(__pyx_t_9);
5162   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5163   __pyx_r = -1;
5164   __pyx_L0:;
5165   __Pyx_XDECREF((PyObject *)__pyx_v_element);
5166   __Pyx_XDECREF(__pyx_v_tag);
5167   __Pyx_RefNannyFinishContext();
5168   return __pyx_r;
5169 }
5170
5171 /* "lxml/objectify.pyx":259
5172  *             _replaceElement(element, value)
5173  * 
5174  *     def __delattr__(self, tag):             # <<<<<<<<<<<<<<
5175  *         child = _lookupChildOrRaise(self, tag)
5176  *         self.remove(child)
5177  */
5178
5179 /* Python wrapper */
5180 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_17__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
5181 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_17__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
5182   int __pyx_r;
5183   __Pyx_RefNannyDeclarations
5184   __Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0);
5185   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_16__delattr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
5186
5187   /* function exit code */
5188   __Pyx_RefNannyFinishContext();
5189   return __pyx_r;
5190 }
5191
5192 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_16__delattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag) {
5193   PyObject *__pyx_v_child = NULL;
5194   int __pyx_r;
5195   __Pyx_RefNannyDeclarations
5196   PyObject *__pyx_t_1 = NULL;
5197   PyObject *__pyx_t_2 = NULL;
5198   PyObject *__pyx_t_3 = NULL;
5199   int __pyx_lineno = 0;
5200   const char *__pyx_filename = NULL;
5201   int __pyx_clineno = 0;
5202   __Pyx_RefNannySetupContext("__delattr__", 0);
5203
5204   /* "lxml/objectify.pyx":260
5205  * 
5206  *     def __delattr__(self, tag):
5207  *         child = _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<<
5208  *         self.remove(child)
5209  * 
5210  */
5211   __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)
5212   __Pyx_GOTREF(__pyx_t_1);
5213   __pyx_v_child = __pyx_t_1;
5214   __pyx_t_1 = 0;
5215
5216   /* "lxml/objectify.pyx":261
5217  *     def __delattr__(self, tag):
5218  *         child = _lookupChildOrRaise(self, tag)
5219  *         self.remove(child)             # <<<<<<<<<<<<<<
5220  * 
5221  *     def addattr(self, tag, value):
5222  */
5223   __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)
5224   __Pyx_GOTREF(__pyx_t_2);
5225   __pyx_t_3 = NULL;
5226   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5227     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
5228     if (likely(__pyx_t_3)) {
5229       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5230       __Pyx_INCREF(__pyx_t_3);
5231       __Pyx_INCREF(function);
5232       __Pyx_DECREF_SET(__pyx_t_2, function);
5233     }
5234   }
5235   __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);
5236   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5237   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
5238   __Pyx_GOTREF(__pyx_t_1);
5239   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5240   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5241
5242   /* "lxml/objectify.pyx":259
5243  *             _replaceElement(element, value)
5244  * 
5245  *     def __delattr__(self, tag):             # <<<<<<<<<<<<<<
5246  *         child = _lookupChildOrRaise(self, tag)
5247  *         self.remove(child)
5248  */
5249
5250   /* function exit code */
5251   __pyx_r = 0;
5252   goto __pyx_L0;
5253   __pyx_L1_error:;
5254   __Pyx_XDECREF(__pyx_t_1);
5255   __Pyx_XDECREF(__pyx_t_2);
5256   __Pyx_XDECREF(__pyx_t_3);
5257   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5258   __pyx_r = -1;
5259   __pyx_L0:;
5260   __Pyx_XDECREF(__pyx_v_child);
5261   __Pyx_RefNannyFinishContext();
5262   return __pyx_r;
5263 }
5264
5265 /* "lxml/objectify.pyx":263
5266  *         self.remove(child)
5267  * 
5268  *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
5269  *         u"""addattr(self, tag, value)
5270  * 
5271  */
5272
5273 /* Python wrapper */
5274 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5275 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        ";
5276 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};
5277 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5278   PyObject *__pyx_v_tag = 0;
5279   PyObject *__pyx_v_value = 0;
5280   int __pyx_lineno = 0;
5281   const char *__pyx_filename = NULL;
5282   int __pyx_clineno = 0;
5283   PyObject *__pyx_r = 0;
5284   __Pyx_RefNannyDeclarations
5285   __Pyx_RefNannySetupContext("addattr (wrapper)", 0);
5286   {
5287     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag,&__pyx_n_s_value,0};
5288     PyObject* values[2] = {0,0};
5289     if (unlikely(__pyx_kwds)) {
5290       Py_ssize_t kw_args;
5291       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5292       switch (pos_args) {
5293         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5294         CYTHON_FALLTHROUGH;
5295         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5296         CYTHON_FALLTHROUGH;
5297         case  0: break;
5298         default: goto __pyx_L5_argtuple_error;
5299       }
5300       kw_args = PyDict_Size(__pyx_kwds);
5301       switch (pos_args) {
5302         case  0:
5303         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
5304         else goto __pyx_L5_argtuple_error;
5305         CYTHON_FALLTHROUGH;
5306         case  1:
5307         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
5308         else {
5309           __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); __PYX_ERR(0, 263, __pyx_L3_error)
5310         }
5311       }
5312       if (unlikely(kw_args > 0)) {
5313         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addattr") < 0)) __PYX_ERR(0, 263, __pyx_L3_error)
5314       }
5315     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5316       goto __pyx_L5_argtuple_error;
5317     } else {
5318       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5319       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5320     }
5321     __pyx_v_tag = values[0];
5322     __pyx_v_value = values[1];
5323   }
5324   goto __pyx_L4_argument_unpacking_done;
5325   __pyx_L5_argtuple_error:;
5326   __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 263, __pyx_L3_error)
5327   __pyx_L3_error:;
5328   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5329   __Pyx_RefNannyFinishContext();
5330   return NULL;
5331   __pyx_L4_argument_unpacking_done:;
5332   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_18addattr(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), __pyx_v_tag, __pyx_v_value);
5333
5334   /* function exit code */
5335   __Pyx_RefNannyFinishContext();
5336   return __pyx_r;
5337 }
5338
5339 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) {
5340   PyObject *__pyx_r = NULL;
5341   __Pyx_RefNannyDeclarations
5342   PyObject *__pyx_t_1 = NULL;
5343   PyObject *__pyx_t_2 = NULL;
5344   int __pyx_lineno = 0;
5345   const char *__pyx_filename = NULL;
5346   int __pyx_clineno = 0;
5347   __Pyx_RefNannySetupContext("addattr", 0);
5348
5349   /* "lxml/objectify.pyx":270
5350  *         As opposed to append(), it sets a data value, not an element.
5351  *         """
5352  *         _appendValue(self, _buildChildTag(self, tag), value)             # <<<<<<<<<<<<<<
5353  * 
5354  *     def __getitem__(self, key):
5355  */
5356   __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)
5357   __Pyx_GOTREF(__pyx_t_1);
5358   __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)
5359   __Pyx_GOTREF(__pyx_t_2);
5360   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5361   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5362
5363   /* "lxml/objectify.pyx":263
5364  *         self.remove(child)
5365  * 
5366  *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
5367  *         u"""addattr(self, tag, value)
5368  * 
5369  */
5370
5371   /* function exit code */
5372   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5373   goto __pyx_L0;
5374   __pyx_L1_error:;
5375   __Pyx_XDECREF(__pyx_t_1);
5376   __Pyx_XDECREF(__pyx_t_2);
5377   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5378   __pyx_r = NULL;
5379   __pyx_L0:;
5380   __Pyx_XGIVEREF(__pyx_r);
5381   __Pyx_RefNannyFinishContext();
5382   return __pyx_r;
5383 }
5384
5385 /* "lxml/objectify.pyx":272
5386  *         _appendValue(self, _buildChildTag(self, tag), value)
5387  * 
5388  *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
5389  *         u"""Return a sibling, counting from the first child of the parent.  The
5390  *         method behaves like both a dict and a sequence.
5391  */
5392
5393 /* Python wrapper */
5394 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
5395 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        ";
5396 #if CYTHON_COMPILING_IN_CPYTHON
5397 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__;
5398 #endif
5399 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
5400   PyObject *__pyx_r = 0;
5401   __Pyx_RefNannyDeclarations
5402   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
5403   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_20__getitem__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_key));
5404
5405   /* function exit code */
5406   __Pyx_RefNannyFinishContext();
5407   return __pyx_r;
5408 }
5409
5410 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_20__getitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key) {
5411   xmlNode *__pyx_v_c_self_node;
5412   xmlNode *__pyx_v_c_parent;
5413   xmlNode *__pyx_v_c_node;
5414   Py_ssize_t __pyx_v_c_index;
5415   PyObject *__pyx_r = NULL;
5416   __Pyx_RefNannyDeclarations
5417   int __pyx_t_1;
5418   PyObject *__pyx_t_2 = NULL;
5419   int __pyx_t_3;
5420   PyObject *__pyx_t_4 = NULL;
5421   Py_ssize_t __pyx_t_5;
5422   xmlNode *__pyx_t_6;
5423   int __pyx_lineno = 0;
5424   const char *__pyx_filename = NULL;
5425   int __pyx_clineno = 0;
5426   __Pyx_RefNannySetupContext("__getitem__", 0);
5427
5428   /* "lxml/objectify.pyx":288
5429  *         cdef tree.xmlNode* c_node
5430  *         cdef Py_ssize_t c_index
5431  *         if python._isString(key):             # <<<<<<<<<<<<<<
5432  *             return _lookupChildOrRaise(self, key)
5433  *         elif isinstance(key, slice):
5434  */
5435   __pyx_t_1 = (_isString(__pyx_v_key) != 0);
5436   if (__pyx_t_1) {
5437
5438     /* "lxml/objectify.pyx":289
5439  *         cdef Py_ssize_t c_index
5440  *         if python._isString(key):
5441  *             return _lookupChildOrRaise(self, key)             # <<<<<<<<<<<<<<
5442  *         elif isinstance(key, slice):
5443  *             return list(self)[key]
5444  */
5445     __Pyx_XDECREF(__pyx_r);
5446     __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)
5447     __Pyx_GOTREF(__pyx_t_2);
5448     __pyx_r = __pyx_t_2;
5449     __pyx_t_2 = 0;
5450     goto __pyx_L0;
5451
5452     /* "lxml/objectify.pyx":288
5453  *         cdef tree.xmlNode* c_node
5454  *         cdef Py_ssize_t c_index
5455  *         if python._isString(key):             # <<<<<<<<<<<<<<
5456  *             return _lookupChildOrRaise(self, key)
5457  *         elif isinstance(key, slice):
5458  */
5459   }
5460
5461   /* "lxml/objectify.pyx":290
5462  *         if python._isString(key):
5463  *             return _lookupChildOrRaise(self, key)
5464  *         elif isinstance(key, slice):             # <<<<<<<<<<<<<<
5465  *             return list(self)[key]
5466  *         # normal item access
5467  */
5468   __pyx_t_1 = PySlice_Check(__pyx_v_key); 
5469   __pyx_t_3 = (__pyx_t_1 != 0);
5470   if (__pyx_t_3) {
5471
5472     /* "lxml/objectify.pyx":291
5473  *             return _lookupChildOrRaise(self, key)
5474  *         elif isinstance(key, slice):
5475  *             return list(self)[key]             # <<<<<<<<<<<<<<
5476  *         # normal item access
5477  *         c_index = key   # raises TypeError if necessary
5478  */
5479     __Pyx_XDECREF(__pyx_r);
5480     __pyx_t_2 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
5481     __Pyx_GOTREF(__pyx_t_2);
5482     __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error)
5483     __Pyx_GOTREF(__pyx_t_4);
5484     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5485     __pyx_r = __pyx_t_4;
5486     __pyx_t_4 = 0;
5487     goto __pyx_L0;
5488
5489     /* "lxml/objectify.pyx":290
5490  *         if python._isString(key):
5491  *             return _lookupChildOrRaise(self, key)
5492  *         elif isinstance(key, slice):             # <<<<<<<<<<<<<<
5493  *             return list(self)[key]
5494  *         # normal item access
5495  */
5496   }
5497
5498   /* "lxml/objectify.pyx":293
5499  *             return list(self)[key]
5500  *         # normal item access
5501  *         c_index = key   # raises TypeError if necessary             # <<<<<<<<<<<<<<
5502  *         c_self_node = self._c_node
5503  *         c_parent = c_self_node.parent
5504  */
5505   __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)
5506   __pyx_v_c_index = __pyx_t_5;
5507
5508   /* "lxml/objectify.pyx":294
5509  *         # normal item access
5510  *         c_index = key   # raises TypeError if necessary
5511  *         c_self_node = self._c_node             # <<<<<<<<<<<<<<
5512  *         c_parent = c_self_node.parent
5513  *         if c_parent is NULL:
5514  */
5515   __pyx_t_6 = __pyx_v_self->__pyx_base.__pyx_base._c_node;
5516   __pyx_v_c_self_node = __pyx_t_6;
5517
5518   /* "lxml/objectify.pyx":295
5519  *         c_index = key   # raises TypeError if necessary
5520  *         c_self_node = self._c_node
5521  *         c_parent = c_self_node.parent             # <<<<<<<<<<<<<<
5522  *         if c_parent is NULL:
5523  *             if c_index == 0 or c_index == -1:
5524  */
5525   __pyx_t_6 = __pyx_v_c_self_node->parent;
5526   __pyx_v_c_parent = __pyx_t_6;
5527
5528   /* "lxml/objectify.pyx":296
5529  *         c_self_node = self._c_node
5530  *         c_parent = c_self_node.parent
5531  *         if c_parent is NULL:             # <<<<<<<<<<<<<<
5532  *             if c_index == 0 or c_index == -1:
5533  *                 return self
5534  */
5535   __pyx_t_3 = ((__pyx_v_c_parent == NULL) != 0);
5536   if (__pyx_t_3) {
5537
5538     /* "lxml/objectify.pyx":297
5539  *         c_parent = c_self_node.parent
5540  *         if c_parent is NULL:
5541  *             if c_index == 0 or c_index == -1:             # <<<<<<<<<<<<<<
5542  *                 return self
5543  *             raise IndexError, unicode(key)
5544  */
5545     switch (__pyx_v_c_index) {
5546       case 0:
5547       case -1L:
5548
5549       /* "lxml/objectify.pyx":298
5550  *         if c_parent is NULL:
5551  *             if c_index == 0 or c_index == -1:
5552  *                 return self             # <<<<<<<<<<<<<<
5553  *             raise IndexError, unicode(key)
5554  *         if c_index < 0:
5555  */
5556       __Pyx_XDECREF(__pyx_r);
5557       __Pyx_INCREF(((PyObject *)__pyx_v_self));
5558       __pyx_r = ((PyObject *)__pyx_v_self);
5559       goto __pyx_L0;
5560
5561       /* "lxml/objectify.pyx":297
5562  *         c_parent = c_self_node.parent
5563  *         if c_parent is NULL:
5564  *             if c_index == 0 or c_index == -1:             # <<<<<<<<<<<<<<
5565  *                 return self
5566  *             raise IndexError, unicode(key)
5567  */
5568       break;
5569       default: break;
5570     }
5571
5572     /* "lxml/objectify.pyx":299
5573  *             if c_index == 0 or c_index == -1:
5574  *                 return self
5575  *             raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
5576  *         if c_index < 0:
5577  *             c_node = c_parent.last
5578  */
5579     __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error)
5580     __Pyx_GOTREF(__pyx_t_4);
5581     __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_4, 0, 0);
5582     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5583     __PYX_ERR(0, 299, __pyx_L1_error)
5584
5585     /* "lxml/objectify.pyx":296
5586  *         c_self_node = self._c_node
5587  *         c_parent = c_self_node.parent
5588  *         if c_parent is NULL:             # <<<<<<<<<<<<<<
5589  *             if c_index == 0 or c_index == -1:
5590  *                 return self
5591  */
5592   }
5593
5594   /* "lxml/objectify.pyx":300
5595  *                 return self
5596  *             raise IndexError, unicode(key)
5597  *         if c_index < 0:             # <<<<<<<<<<<<<<
5598  *             c_node = c_parent.last
5599  *         else:
5600  */
5601   __pyx_t_3 = ((__pyx_v_c_index < 0) != 0);
5602   if (__pyx_t_3) {
5603
5604     /* "lxml/objectify.pyx":301
5605  *             raise IndexError, unicode(key)
5606  *         if c_index < 0:
5607  *             c_node = c_parent.last             # <<<<<<<<<<<<<<
5608  *         else:
5609  *             c_node = c_parent.children
5610  */
5611     __pyx_t_6 = __pyx_v_c_parent->last;
5612     __pyx_v_c_node = __pyx_t_6;
5613
5614     /* "lxml/objectify.pyx":300
5615  *                 return self
5616  *             raise IndexError, unicode(key)
5617  *         if c_index < 0:             # <<<<<<<<<<<<<<
5618  *             c_node = c_parent.last
5619  *         else:
5620  */
5621     goto __pyx_L5;
5622   }
5623
5624   /* "lxml/objectify.pyx":303
5625  *             c_node = c_parent.last
5626  *         else:
5627  *             c_node = c_parent.children             # <<<<<<<<<<<<<<
5628  *         c_node = _findFollowingSibling(
5629  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5630  */
5631   /*else*/ {
5632     __pyx_t_6 = __pyx_v_c_parent->children;
5633     __pyx_v_c_node = __pyx_t_6;
5634   }
5635   __pyx_L5:;
5636
5637   /* "lxml/objectify.pyx":304
5638  *         else:
5639  *             c_node = c_parent.children
5640  *         c_node = _findFollowingSibling(             # <<<<<<<<<<<<<<
5641  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5642  *         if c_node is NULL:
5643  */
5644   __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);
5645
5646   /* "lxml/objectify.pyx":306
5647  *         c_node = _findFollowingSibling(
5648  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5649  *         if c_node is NULL:             # <<<<<<<<<<<<<<
5650  *             raise IndexError, unicode(key)
5651  *         return elementFactory(self._doc, c_node)
5652  */
5653   __pyx_t_3 = ((__pyx_v_c_node == NULL) != 0);
5654   if (unlikely(__pyx_t_3)) {
5655
5656     /* "lxml/objectify.pyx":307
5657  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5658  *         if c_node is NULL:
5659  *             raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
5660  *         return elementFactory(self._doc, c_node)
5661  * 
5662  */
5663     __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
5664     __Pyx_GOTREF(__pyx_t_4);
5665     __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_4, 0, 0);
5666     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5667     __PYX_ERR(0, 307, __pyx_L1_error)
5668
5669     /* "lxml/objectify.pyx":306
5670  *         c_node = _findFollowingSibling(
5671  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5672  *         if c_node is NULL:             # <<<<<<<<<<<<<<
5673  *             raise IndexError, unicode(key)
5674  *         return elementFactory(self._doc, c_node)
5675  */
5676   }
5677
5678   /* "lxml/objectify.pyx":308
5679  *         if c_node is NULL:
5680  *             raise IndexError, unicode(key)
5681  *         return elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<<
5682  * 
5683  *     def __setitem__(self, key, value):
5684  */
5685   __Pyx_XDECREF(__pyx_r);
5686   __pyx_t_4 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._doc);
5687   __Pyx_INCREF(__pyx_t_4);
5688   __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)
5689   __Pyx_GOTREF(__pyx_t_2);
5690   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5691   __pyx_r = __pyx_t_2;
5692   __pyx_t_2 = 0;
5693   goto __pyx_L0;
5694
5695   /* "lxml/objectify.pyx":272
5696  *         _appendValue(self, _buildChildTag(self, tag), value)
5697  * 
5698  *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
5699  *         u"""Return a sibling, counting from the first child of the parent.  The
5700  *         method behaves like both a dict and a sequence.
5701  */
5702
5703   /* function exit code */
5704   __pyx_L1_error:;
5705   __Pyx_XDECREF(__pyx_t_2);
5706   __Pyx_XDECREF(__pyx_t_4);
5707   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5708   __pyx_r = NULL;
5709   __pyx_L0:;
5710   __Pyx_XGIVEREF(__pyx_r);
5711   __Pyx_RefNannyFinishContext();
5712   return __pyx_r;
5713 }
5714
5715 /* "lxml/objectify.pyx":310
5716  *         return elementFactory(self._doc, c_node)
5717  * 
5718  *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
5719  *         u"""Set the value of a sibling, counting from the first child of the
5720  *         parent.  Implements key assignment, item assignment and slice
5721  */
5722
5723 /* Python wrapper */
5724 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_23__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
5725 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        ";
5726 #if CYTHON_COMPILING_IN_CPYTHON
5727 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__;
5728 #endif
5729 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_23__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
5730   int __pyx_r;
5731   __Pyx_RefNannyDeclarations
5732   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
5733   __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));
5734
5735   /* function exit code */
5736   __Pyx_RefNannyFinishContext();
5737   return __pyx_r;
5738 }
5739
5740 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) {
5741   struct LxmlElement *__pyx_v_element = 0;
5742   xmlNode *__pyx_v_c_node;
5743   int __pyx_r;
5744   __Pyx_RefNannyDeclarations
5745   int __pyx_t_1;
5746   PyObject *__pyx_t_2 = NULL;
5747   int __pyx_t_3;
5748   xmlNode *__pyx_t_4;
5749   Py_ssize_t __pyx_t_5;
5750   PyObject *__pyx_t_6 = NULL;
5751   int __pyx_lineno = 0;
5752   const char *__pyx_filename = NULL;
5753   int __pyx_clineno = 0;
5754   __Pyx_RefNannySetupContext("__setitem__", 0);
5755   __Pyx_INCREF(__pyx_v_key);
5756
5757   /* "lxml/objectify.pyx":325
5758  *         cdef _Element element
5759  *         cdef tree.xmlNode* c_node
5760  *         if python._isString(key):             # <<<<<<<<<<<<<<
5761  *             key = _buildChildTag(self, key)
5762  *             element = _lookupChild(self, key)
5763  */
5764   __pyx_t_1 = (_isString(__pyx_v_key) != 0);
5765   if (__pyx_t_1) {
5766
5767     /* "lxml/objectify.pyx":326
5768  *         cdef tree.xmlNode* c_node
5769  *         if python._isString(key):
5770  *             key = _buildChildTag(self, key)             # <<<<<<<<<<<<<<
5771  *             element = _lookupChild(self, key)
5772  *             if element is None:
5773  */
5774     __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)
5775     __Pyx_GOTREF(__pyx_t_2);
5776     __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2);
5777     __pyx_t_2 = 0;
5778
5779     /* "lxml/objectify.pyx":327
5780  *         if python._isString(key):
5781  *             key = _buildChildTag(self, key)
5782  *             element = _lookupChild(self, key)             # <<<<<<<<<<<<<<
5783  *             if element is None:
5784  *                 _appendValue(self, key, value)
5785  */
5786     __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)
5787     __Pyx_GOTREF(__pyx_t_2);
5788     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)
5789     __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
5790     __pyx_t_2 = 0;
5791
5792     /* "lxml/objectify.pyx":328
5793  *             key = _buildChildTag(self, key)
5794  *             element = _lookupChild(self, key)
5795  *             if element is None:             # <<<<<<<<<<<<<<
5796  *                 _appendValue(self, key, value)
5797  *             else:
5798  */
5799     __pyx_t_1 = (((PyObject *)__pyx_v_element) == Py_None);
5800     __pyx_t_3 = (__pyx_t_1 != 0);
5801     if (__pyx_t_3) {
5802
5803       /* "lxml/objectify.pyx":329
5804  *             element = _lookupChild(self, key)
5805  *             if element is None:
5806  *                 _appendValue(self, key, value)             # <<<<<<<<<<<<<<
5807  *             else:
5808  *                 _replaceElement(element, value)
5809  */
5810       __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)
5811       __Pyx_GOTREF(__pyx_t_2);
5812       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5813
5814       /* "lxml/objectify.pyx":328
5815  *             key = _buildChildTag(self, key)
5816  *             element = _lookupChild(self, key)
5817  *             if element is None:             # <<<<<<<<<<<<<<
5818  *                 _appendValue(self, key, value)
5819  *             else:
5820  */
5821       goto __pyx_L4;
5822     }
5823
5824     /* "lxml/objectify.pyx":331
5825  *                 _appendValue(self, key, value)
5826  *             else:
5827  *                 _replaceElement(element, value)             # <<<<<<<<<<<<<<
5828  *             return
5829  * 
5830  */
5831     /*else*/ {
5832       __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)
5833       __Pyx_GOTREF(__pyx_t_2);
5834       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5835     }
5836     __pyx_L4:;
5837
5838     /* "lxml/objectify.pyx":332
5839  *             else:
5840  *                 _replaceElement(element, value)
5841  *             return             # <<<<<<<<<<<<<<
5842  * 
5843  *         if self._c_node.parent is NULL:
5844  */
5845     __pyx_r = 0;
5846     goto __pyx_L0;
5847
5848     /* "lxml/objectify.pyx":325
5849  *         cdef _Element element
5850  *         cdef tree.xmlNode* c_node
5851  *         if python._isString(key):             # <<<<<<<<<<<<<<
5852  *             key = _buildChildTag(self, key)
5853  *             element = _lookupChild(self, key)
5854  */
5855   }
5856
5857   /* "lxml/objectify.pyx":334
5858  *             return
5859  * 
5860  *         if self._c_node.parent is NULL:             # <<<<<<<<<<<<<<
5861  *             # the 'root[i] = ...' case
5862  *             raise TypeError, u"assignment to root element is invalid"
5863  */
5864   __pyx_t_3 = ((__pyx_v_self->__pyx_base.__pyx_base._c_node->parent == NULL) != 0);
5865   if (unlikely(__pyx_t_3)) {
5866
5867     /* "lxml/objectify.pyx":336
5868  *         if self._c_node.parent is NULL:
5869  *             # the 'root[i] = ...' case
5870  *             raise TypeError, u"assignment to root element is invalid"             # <<<<<<<<<<<<<<
5871  * 
5872  *         if isinstance(key, slice):
5873  */
5874     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_assignment_to_root_element_is_in, 0, 0);
5875     __PYX_ERR(0, 336, __pyx_L1_error)
5876
5877     /* "lxml/objectify.pyx":334
5878  *             return
5879  * 
5880  *         if self._c_node.parent is NULL:             # <<<<<<<<<<<<<<
5881  *             # the 'root[i] = ...' case
5882  *             raise TypeError, u"assignment to root element is invalid"
5883  */
5884   }
5885
5886   /* "lxml/objectify.pyx":338
5887  *             raise TypeError, u"assignment to root element is invalid"
5888  * 
5889  *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
5890  *             # slice assignment
5891  *             _setSlice(key, self, value)
5892  */
5893   __pyx_t_3 = PySlice_Check(__pyx_v_key); 
5894   __pyx_t_1 = (__pyx_t_3 != 0);
5895   if (__pyx_t_1) {
5896
5897     /* "lxml/objectify.pyx":340
5898  *         if isinstance(key, slice):
5899  *             # slice assignment
5900  *             _setSlice(key, self, value)             # <<<<<<<<<<<<<<
5901  *         else:
5902  *             # normal index assignment
5903  */
5904     __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)
5905     __Pyx_GOTREF(__pyx_t_2);
5906     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5907
5908     /* "lxml/objectify.pyx":338
5909  *             raise TypeError, u"assignment to root element is invalid"
5910  * 
5911  *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
5912  *             # slice assignment
5913  *             _setSlice(key, self, value)
5914  */
5915     goto __pyx_L6;
5916   }
5917
5918   /* "lxml/objectify.pyx":343
5919  *         else:
5920  *             # normal index assignment
5921  *             if key < 0:             # <<<<<<<<<<<<<<
5922  *                 c_node = self._c_node.parent.last
5923  *             else:
5924  */
5925   /*else*/ {
5926     __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)
5927     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 343, __pyx_L1_error)
5928     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5929     if (__pyx_t_1) {
5930
5931       /* "lxml/objectify.pyx":344
5932  *             # normal index assignment
5933  *             if key < 0:
5934  *                 c_node = self._c_node.parent.last             # <<<<<<<<<<<<<<
5935  *             else:
5936  *                 c_node = self._c_node.parent.children
5937  */
5938       __pyx_t_4 = __pyx_v_self->__pyx_base.__pyx_base._c_node->parent->last;
5939       __pyx_v_c_node = __pyx_t_4;
5940
5941       /* "lxml/objectify.pyx":343
5942  *         else:
5943  *             # normal index assignment
5944  *             if key < 0:             # <<<<<<<<<<<<<<
5945  *                 c_node = self._c_node.parent.last
5946  *             else:
5947  */
5948       goto __pyx_L7;
5949     }
5950
5951     /* "lxml/objectify.pyx":346
5952  *                 c_node = self._c_node.parent.last
5953  *             else:
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  */
5958     /*else*/ {
5959       __pyx_t_4 = __pyx_v_self->__pyx_base.__pyx_base._c_node->parent->children;
5960       __pyx_v_c_node = __pyx_t_4;
5961     }
5962     __pyx_L7:;
5963
5964     /* "lxml/objectify.pyx":348
5965  *                 c_node = self._c_node.parent.children
5966  *             c_node = _findFollowingSibling(
5967  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)             # <<<<<<<<<<<<<<
5968  *             if c_node is NULL:
5969  *                 raise IndexError, unicode(key)
5970  */
5971     __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)
5972
5973     /* "lxml/objectify.pyx":347
5974  *             else:
5975  *                 c_node = self._c_node.parent.children
5976  *             c_node = _findFollowingSibling(             # <<<<<<<<<<<<<<
5977  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
5978  *             if c_node is NULL:
5979  */
5980     __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);
5981
5982     /* "lxml/objectify.pyx":349
5983  *             c_node = _findFollowingSibling(
5984  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
5985  *             if c_node is NULL:             # <<<<<<<<<<<<<<
5986  *                 raise IndexError, unicode(key)
5987  *             element = elementFactory(self._doc, c_node)
5988  */
5989     __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0);
5990     if (unlikely(__pyx_t_1)) {
5991
5992       /* "lxml/objectify.pyx":350
5993  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
5994  *             if c_node is NULL:
5995  *                 raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
5996  *             element = elementFactory(self._doc, c_node)
5997  *             _replaceElement(element, value)
5998  */
5999       __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error)
6000       __Pyx_GOTREF(__pyx_t_2);
6001       __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_2, 0, 0);
6002       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6003       __PYX_ERR(0, 350, __pyx_L1_error)
6004
6005       /* "lxml/objectify.pyx":349
6006  *             c_node = _findFollowingSibling(
6007  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
6008  *             if c_node is NULL:             # <<<<<<<<<<<<<<
6009  *                 raise IndexError, unicode(key)
6010  *             element = elementFactory(self._doc, c_node)
6011  */
6012     }
6013
6014     /* "lxml/objectify.pyx":351
6015  *             if c_node is NULL:
6016  *                 raise IndexError, unicode(key)
6017  *             element = elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<<
6018  *             _replaceElement(element, value)
6019  * 
6020  */
6021     __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._doc);
6022     __Pyx_INCREF(__pyx_t_2);
6023     __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)
6024     __Pyx_GOTREF(__pyx_t_6);
6025     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6026     __pyx_v_element = ((struct LxmlElement *)__pyx_t_6);
6027     __pyx_t_6 = 0;
6028
6029     /* "lxml/objectify.pyx":352
6030  *                 raise IndexError, unicode(key)
6031  *             element = elementFactory(self._doc, c_node)
6032  *             _replaceElement(element, value)             # <<<<<<<<<<<<<<
6033  * 
6034  *     def __delitem__(self, key):
6035  */
6036     __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)
6037     __Pyx_GOTREF(__pyx_t_6);
6038     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6039   }
6040   __pyx_L6:;
6041
6042   /* "lxml/objectify.pyx":310
6043  *         return elementFactory(self._doc, c_node)
6044  * 
6045  *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
6046  *         u"""Set the value of a sibling, counting from the first child of the
6047  *         parent.  Implements key assignment, item assignment and slice
6048  */
6049
6050   /* function exit code */
6051   __pyx_r = 0;
6052   goto __pyx_L0;
6053   __pyx_L1_error:;
6054   __Pyx_XDECREF(__pyx_t_2);
6055   __Pyx_XDECREF(__pyx_t_6);
6056   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6057   __pyx_r = -1;
6058   __pyx_L0:;
6059   __Pyx_XDECREF((PyObject *)__pyx_v_element);
6060   __Pyx_XDECREF(__pyx_v_key);
6061   __Pyx_RefNannyFinishContext();
6062   return __pyx_r;
6063 }
6064
6065 /* "lxml/objectify.pyx":354
6066  *             _replaceElement(element, value)
6067  * 
6068  *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
6069  *         parent = self.getparent()
6070  *         if parent is None:
6071  */
6072
6073 /* Python wrapper */
6074 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_25__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
6075 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_25__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
6076   int __pyx_r;
6077   __Pyx_RefNannyDeclarations
6078   __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
6079   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_24__delitem__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_key));
6080
6081   /* function exit code */
6082   __Pyx_RefNannyFinishContext();
6083   return __pyx_r;
6084 }
6085
6086 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_24__delitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key) {
6087   PyObject *__pyx_v_parent = NULL;
6088   PyObject *__pyx_v_del_items = NULL;
6089   PyObject *__pyx_v_remove = NULL;
6090   PyObject *__pyx_v_el = NULL;
6091   PyObject *__pyx_v_sibling = NULL;
6092   int __pyx_r;
6093   __Pyx_RefNannyDeclarations
6094   PyObject *__pyx_t_1 = NULL;
6095   PyObject *__pyx_t_2 = NULL;
6096   PyObject *__pyx_t_3 = NULL;
6097   int __pyx_t_4;
6098   int __pyx_t_5;
6099   Py_ssize_t __pyx_t_6;
6100   PyObject *(*__pyx_t_7)(PyObject *);
6101   PyObject *__pyx_t_8 = NULL;
6102   int __pyx_lineno = 0;
6103   const char *__pyx_filename = NULL;
6104   int __pyx_clineno = 0;
6105   __Pyx_RefNannySetupContext("__delitem__", 0);
6106
6107   /* "lxml/objectify.pyx":355
6108  * 
6109  *     def __delitem__(self, key):
6110  *         parent = self.getparent()             # <<<<<<<<<<<<<<
6111  *         if parent is None:
6112  *             raise TypeError, u"deleting items not supported by root element"
6113  */
6114   __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)
6115   __Pyx_GOTREF(__pyx_t_2);
6116   __pyx_t_3 = NULL;
6117   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
6118     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
6119     if (likely(__pyx_t_3)) {
6120       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
6121       __Pyx_INCREF(__pyx_t_3);
6122       __Pyx_INCREF(function);
6123       __Pyx_DECREF_SET(__pyx_t_2, function);
6124     }
6125   }
6126   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
6127   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6128   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
6129   __Pyx_GOTREF(__pyx_t_1);
6130   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6131   __pyx_v_parent = __pyx_t_1;
6132   __pyx_t_1 = 0;
6133
6134   /* "lxml/objectify.pyx":356
6135  *     def __delitem__(self, key):
6136  *         parent = self.getparent()
6137  *         if parent is None:             # <<<<<<<<<<<<<<
6138  *             raise TypeError, u"deleting items not supported by root element"
6139  *         if isinstance(key, slice):
6140  */
6141   __pyx_t_4 = (__pyx_v_parent == Py_None);
6142   __pyx_t_5 = (__pyx_t_4 != 0);
6143   if (unlikely(__pyx_t_5)) {
6144
6145     /* "lxml/objectify.pyx":357
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  *             # slice deletion
6151  */
6152     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_deleting_items_not_supported_by, 0, 0);
6153     __PYX_ERR(0, 357, __pyx_L1_error)
6154
6155     /* "lxml/objectify.pyx":356
6156  *     def __delitem__(self, key):
6157  *         parent = self.getparent()
6158  *         if parent is None:             # <<<<<<<<<<<<<<
6159  *             raise TypeError, u"deleting items not supported by root element"
6160  *         if isinstance(key, slice):
6161  */
6162   }
6163
6164   /* "lxml/objectify.pyx":358
6165  *         if parent is None:
6166  *             raise TypeError, u"deleting items not supported by root element"
6167  *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
6168  *             # slice deletion
6169  *             del_items = list(self)[key]
6170  */
6171   __pyx_t_5 = PySlice_Check(__pyx_v_key); 
6172   __pyx_t_4 = (__pyx_t_5 != 0);
6173   if (__pyx_t_4) {
6174
6175     /* "lxml/objectify.pyx":360
6176  *         if isinstance(key, slice):
6177  *             # slice deletion
6178  *             del_items = list(self)[key]             # <<<<<<<<<<<<<<
6179  *             remove = parent.remove
6180  *             for el in del_items:
6181  */
6182     __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
6183     __Pyx_GOTREF(__pyx_t_1);
6184     __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
6185     __Pyx_GOTREF(__pyx_t_2);
6186     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6187     __pyx_v_del_items = __pyx_t_2;
6188     __pyx_t_2 = 0;
6189
6190     /* "lxml/objectify.pyx":361
6191  *             # slice deletion
6192  *             del_items = list(self)[key]
6193  *             remove = parent.remove             # <<<<<<<<<<<<<<
6194  *             for el in del_items:
6195  *                 remove(el)
6196  */
6197     __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)
6198     __Pyx_GOTREF(__pyx_t_2);
6199     __pyx_v_remove = __pyx_t_2;
6200     __pyx_t_2 = 0;
6201
6202     /* "lxml/objectify.pyx":362
6203  *             del_items = list(self)[key]
6204  *             remove = parent.remove
6205  *             for el in del_items:             # <<<<<<<<<<<<<<
6206  *                 remove(el)
6207  *         else:
6208  */
6209     if (likely(PyList_CheckExact(__pyx_v_del_items)) || PyTuple_CheckExact(__pyx_v_del_items)) {
6210       __pyx_t_2 = __pyx_v_del_items; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
6211       __pyx_t_7 = NULL;
6212     } else {
6213       __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)
6214       __Pyx_GOTREF(__pyx_t_2);
6215       __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 362, __pyx_L1_error)
6216     }
6217     for (;;) {
6218       if (likely(!__pyx_t_7)) {
6219         if (likely(PyList_CheckExact(__pyx_t_2))) {
6220           if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
6221           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6222           __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)
6223           #else
6224           __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)
6225           __Pyx_GOTREF(__pyx_t_1);
6226           #endif
6227         } else {
6228           if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
6229           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6230           __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)
6231           #else
6232           __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)
6233           __Pyx_GOTREF(__pyx_t_1);
6234           #endif
6235         }
6236       } else {
6237         __pyx_t_1 = __pyx_t_7(__pyx_t_2);
6238         if (unlikely(!__pyx_t_1)) {
6239           PyObject* exc_type = PyErr_Occurred();
6240           if (exc_type) {
6241             if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6242             else __PYX_ERR(0, 362, __pyx_L1_error)
6243           }
6244           break;
6245         }
6246         __Pyx_GOTREF(__pyx_t_1);
6247       }
6248       __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_1);
6249       __pyx_t_1 = 0;
6250
6251       /* "lxml/objectify.pyx":363
6252  *             remove = parent.remove
6253  *             for el in del_items:
6254  *                 remove(el)             # <<<<<<<<<<<<<<
6255  *         else:
6256  *             # normal index deletion
6257  */
6258       __Pyx_INCREF(__pyx_v_remove);
6259       __pyx_t_3 = __pyx_v_remove; __pyx_t_8 = NULL;
6260       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6261         __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
6262         if (likely(__pyx_t_8)) {
6263           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6264           __Pyx_INCREF(__pyx_t_8);
6265           __Pyx_INCREF(function);
6266           __Pyx_DECREF_SET(__pyx_t_3, function);
6267         }
6268       }
6269       __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);
6270       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6271       if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
6272       __Pyx_GOTREF(__pyx_t_1);
6273       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6274       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6275
6276       /* "lxml/objectify.pyx":362
6277  *             del_items = list(self)[key]
6278  *             remove = parent.remove
6279  *             for el in del_items:             # <<<<<<<<<<<<<<
6280  *                 remove(el)
6281  *         else:
6282  */
6283     }
6284     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6285
6286     /* "lxml/objectify.pyx":358
6287  *         if parent is None:
6288  *             raise TypeError, u"deleting items not supported by root element"
6289  *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
6290  *             # slice deletion
6291  *             del_items = list(self)[key]
6292  */
6293     goto __pyx_L4;
6294   }
6295
6296   /* "lxml/objectify.pyx":366
6297  *         else:
6298  *             # normal index deletion
6299  *             sibling = self.__getitem__(key)             # <<<<<<<<<<<<<<
6300  *             parent.remove(sibling)
6301  * 
6302  */
6303   /*else*/ {
6304     __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)
6305     __Pyx_GOTREF(__pyx_t_1);
6306     __pyx_t_3 = NULL;
6307     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
6308       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
6309       if (likely(__pyx_t_3)) {
6310         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
6311         __Pyx_INCREF(__pyx_t_3);
6312         __Pyx_INCREF(function);
6313         __Pyx_DECREF_SET(__pyx_t_1, function);
6314       }
6315     }
6316     __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);
6317     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6318     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
6319     __Pyx_GOTREF(__pyx_t_2);
6320     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6321     __pyx_v_sibling = __pyx_t_2;
6322     __pyx_t_2 = 0;
6323
6324     /* "lxml/objectify.pyx":367
6325  *             # normal index deletion
6326  *             sibling = self.__getitem__(key)
6327  *             parent.remove(sibling)             # <<<<<<<<<<<<<<
6328  * 
6329  *     def descendantpaths(self, prefix=None):
6330  */
6331     __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)
6332     __Pyx_GOTREF(__pyx_t_1);
6333     __pyx_t_3 = NULL;
6334     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
6335       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
6336       if (likely(__pyx_t_3)) {
6337         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
6338         __Pyx_INCREF(__pyx_t_3);
6339         __Pyx_INCREF(function);
6340         __Pyx_DECREF_SET(__pyx_t_1, function);
6341       }
6342     }
6343     __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);
6344     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6345     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error)
6346     __Pyx_GOTREF(__pyx_t_2);
6347     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6348     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6349   }
6350   __pyx_L4:;
6351
6352   /* "lxml/objectify.pyx":354
6353  *             _replaceElement(element, value)
6354  * 
6355  *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
6356  *         parent = self.getparent()
6357  *         if parent is None:
6358  */
6359
6360   /* function exit code */
6361   __pyx_r = 0;
6362   goto __pyx_L0;
6363   __pyx_L1_error:;
6364   __Pyx_XDECREF(__pyx_t_1);
6365   __Pyx_XDECREF(__pyx_t_2);
6366   __Pyx_XDECREF(__pyx_t_3);
6367   __Pyx_XDECREF(__pyx_t_8);
6368   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6369   __pyx_r = -1;
6370   __pyx_L0:;
6371   __Pyx_XDECREF(__pyx_v_parent);
6372   __Pyx_XDECREF(__pyx_v_del_items);
6373   __Pyx_XDECREF(__pyx_v_remove);
6374   __Pyx_XDECREF(__pyx_v_el);
6375   __Pyx_XDECREF(__pyx_v_sibling);
6376   __Pyx_RefNannyFinishContext();
6377   return __pyx_r;
6378 }
6379
6380 /* "lxml/objectify.pyx":369
6381  *             parent.remove(sibling)
6382  * 
6383  *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
6384  *         u"""descendantpaths(self, prefix=None)
6385  * 
6386  */
6387
6388 /* Python wrapper */
6389 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6390 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        ";
6391 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};
6392 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6393   PyObject *__pyx_v_prefix = 0;
6394   int __pyx_lineno = 0;
6395   const char *__pyx_filename = NULL;
6396   int __pyx_clineno = 0;
6397   PyObject *__pyx_r = 0;
6398   __Pyx_RefNannyDeclarations
6399   __Pyx_RefNannySetupContext("descendantpaths (wrapper)", 0);
6400   {
6401     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
6402     PyObject* values[1] = {0};
6403     values[0] = ((PyObject *)Py_None);
6404     if (unlikely(__pyx_kwds)) {
6405       Py_ssize_t kw_args;
6406       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6407       switch (pos_args) {
6408         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6409         CYTHON_FALLTHROUGH;
6410         case  0: break;
6411         default: goto __pyx_L5_argtuple_error;
6412       }
6413       kw_args = PyDict_Size(__pyx_kwds);
6414       switch (pos_args) {
6415         case  0:
6416         if (kw_args > 0) {
6417           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prefix);
6418           if (value) { values[0] = value; kw_args--; }
6419         }
6420       }
6421       if (unlikely(kw_args > 0)) {
6422         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "descendantpaths") < 0)) __PYX_ERR(0, 369, __pyx_L3_error)
6423       }
6424     } else {
6425       switch (PyTuple_GET_SIZE(__pyx_args)) {
6426         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6427         CYTHON_FALLTHROUGH;
6428         case  0: break;
6429         default: goto __pyx_L5_argtuple_error;
6430       }
6431     }
6432     __pyx_v_prefix = values[0];
6433   }
6434   goto __pyx_L4_argument_unpacking_done;
6435   __pyx_L5_argtuple_error:;
6436   __Pyx_RaiseArgtupleInvalid("descendantpaths", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 369, __pyx_L3_error)
6437   __pyx_L3_error:;
6438   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
6439   __Pyx_RefNannyFinishContext();
6440   return NULL;
6441   __pyx_L4_argument_unpacking_done:;
6442   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_26descendantpaths(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), __pyx_v_prefix);
6443
6444   /* function exit code */
6445   __Pyx_RefNannyFinishContext();
6446   return __pyx_r;
6447 }
6448
6449 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_26descendantpaths(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_prefix) {
6450   PyObject *__pyx_r = NULL;
6451   __Pyx_RefNannyDeclarations
6452   int __pyx_t_1;
6453   int __pyx_t_2;
6454   int __pyx_t_3;
6455   PyObject *__pyx_t_4 = NULL;
6456   int __pyx_lineno = 0;
6457   const char *__pyx_filename = NULL;
6458   int __pyx_clineno = 0;
6459   __Pyx_RefNannySetupContext("descendantpaths", 0);
6460   __Pyx_INCREF(__pyx_v_prefix);
6461
6462   /* "lxml/objectify.pyx":374
6463  *         Returns a list of object path expressions for all descendants.
6464  *         """
6465  *         if prefix is not None and not python._isString(prefix):             # <<<<<<<<<<<<<<
6466  *             prefix = u'.'.join(prefix)
6467  *         return _build_descendant_paths(self._c_node, prefix)
6468  */
6469   __pyx_t_2 = (__pyx_v_prefix != Py_None);
6470   __pyx_t_3 = (__pyx_t_2 != 0);
6471   if (__pyx_t_3) {
6472   } else {
6473     __pyx_t_1 = __pyx_t_3;
6474     goto __pyx_L4_bool_binop_done;
6475   }
6476   __pyx_t_3 = ((!(_isString(__pyx_v_prefix) != 0)) != 0);
6477   __pyx_t_1 = __pyx_t_3;
6478   __pyx_L4_bool_binop_done:;
6479   if (__pyx_t_1) {
6480
6481     /* "lxml/objectify.pyx":375
6482  *         """
6483  *         if prefix is not None and not python._isString(prefix):
6484  *             prefix = u'.'.join(prefix)             # <<<<<<<<<<<<<<
6485  *         return _build_descendant_paths(self._c_node, prefix)
6486  * 
6487  */
6488     __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__2, __pyx_v_prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 375, __pyx_L1_error)
6489     __Pyx_GOTREF(__pyx_t_4);
6490     __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_4);
6491     __pyx_t_4 = 0;
6492
6493     /* "lxml/objectify.pyx":374
6494  *         Returns a list of object path expressions for all descendants.
6495  *         """
6496  *         if prefix is not None and not python._isString(prefix):             # <<<<<<<<<<<<<<
6497  *             prefix = u'.'.join(prefix)
6498  *         return _build_descendant_paths(self._c_node, prefix)
6499  */
6500   }
6501
6502   /* "lxml/objectify.pyx":376
6503  *         if prefix is not None and not python._isString(prefix):
6504  *             prefix = u'.'.join(prefix)
6505  *         return _build_descendant_paths(self._c_node, prefix)             # <<<<<<<<<<<<<<
6506  * 
6507  * 
6508  */
6509   __Pyx_XDECREF(__pyx_r);
6510   __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)
6511   __Pyx_GOTREF(__pyx_t_4);
6512   __pyx_r = __pyx_t_4;
6513   __pyx_t_4 = 0;
6514   goto __pyx_L0;
6515
6516   /* "lxml/objectify.pyx":369
6517  *             parent.remove(sibling)
6518  * 
6519  *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
6520  *         u"""descendantpaths(self, prefix=None)
6521  * 
6522  */
6523
6524   /* function exit code */
6525   __pyx_L1_error:;
6526   __Pyx_XDECREF(__pyx_t_4);
6527   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
6528   __pyx_r = NULL;
6529   __pyx_L0:;
6530   __Pyx_XDECREF(__pyx_v_prefix);
6531   __Pyx_XGIVEREF(__pyx_r);
6532   __Pyx_RefNannyFinishContext();
6533   return __pyx_r;
6534 }
6535
6536 /* "lxml/objectify.pyx":379
6537  * 
6538  * 
6539  * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):             # <<<<<<<<<<<<<<
6540  *     if c_node.name != c_name:
6541  *         return 0
6542  */
6543
6544 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) {
6545   const xmlChar *__pyx_v_c_node_href;
6546   int __pyx_r;
6547   __Pyx_RefNannyDeclarations
6548   int __pyx_t_1;
6549   __Pyx_RefNannySetupContext("_tagMatches", 0);
6550
6551   /* "lxml/objectify.pyx":380
6552  * 
6553  * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
6554  *     if c_node.name != c_name:             # <<<<<<<<<<<<<<
6555  *         return 0
6556  *     if c_href == NULL:
6557  */
6558   __pyx_t_1 = ((__pyx_v_c_node->name != __pyx_v_c_name) != 0);
6559   if (__pyx_t_1) {
6560
6561     /* "lxml/objectify.pyx":381
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  *         return 1
6567  */
6568     __pyx_r = 0;
6569     goto __pyx_L0;
6570
6571     /* "lxml/objectify.pyx":380
6572  * 
6573  * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
6574  *     if c_node.name != c_name:             # <<<<<<<<<<<<<<
6575  *         return 0
6576  *     if c_href == NULL:
6577  */
6578   }
6579
6580   /* "lxml/objectify.pyx":382
6581  *     if c_node.name != c_name:
6582  *         return 0
6583  *     if c_href == NULL:             # <<<<<<<<<<<<<<
6584  *         return 1
6585  *     c_node_href = tree._getNs(c_node)
6586  */
6587   __pyx_t_1 = ((__pyx_v_c_href == NULL) != 0);
6588   if (__pyx_t_1) {
6589
6590     /* "lxml/objectify.pyx":383
6591  *         return 0
6592  *     if c_href == NULL:
6593  *         return 1             # <<<<<<<<<<<<<<
6594  *     c_node_href = tree._getNs(c_node)
6595  *     if c_node_href == NULL:
6596  */
6597     __pyx_r = 1;
6598     goto __pyx_L0;
6599
6600     /* "lxml/objectify.pyx":382
6601  *     if c_node.name != c_name:
6602  *         return 0
6603  *     if c_href == NULL:             # <<<<<<<<<<<<<<
6604  *         return 1
6605  *     c_node_href = tree._getNs(c_node)
6606  */
6607   }
6608
6609   /* "lxml/objectify.pyx":384
6610  *     if c_href == NULL:
6611  *         return 1
6612  *     c_node_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
6613  *     if c_node_href == NULL:
6614  *         return c_href[0] == c'\0'
6615  */
6616   __pyx_v_c_node_href = _getNs(__pyx_v_c_node);
6617
6618   /* "lxml/objectify.pyx":385
6619  *         return 1
6620  *     c_node_href = tree._getNs(c_node)
6621  *     if c_node_href == NULL:             # <<<<<<<<<<<<<<
6622  *         return c_href[0] == c'\0'
6623  *     return tree.xmlStrcmp(c_node_href, c_href) == 0
6624  */
6625   __pyx_t_1 = ((__pyx_v_c_node_href == NULL) != 0);
6626   if (__pyx_t_1) {
6627
6628     /* "lxml/objectify.pyx":386
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     __pyx_r = ((__pyx_v_c_href[0]) == '\x00');
6636     goto __pyx_L0;
6637
6638     /* "lxml/objectify.pyx":385
6639  *         return 1
6640  *     c_node_href = tree._getNs(c_node)
6641  *     if c_node_href == NULL:             # <<<<<<<<<<<<<<
6642  *         return c_href[0] == c'\0'
6643  *     return tree.xmlStrcmp(c_node_href, c_href) == 0
6644  */
6645   }
6646
6647   /* "lxml/objectify.pyx":387
6648  *     if c_node_href == NULL:
6649  *         return c_href[0] == c'\0'
6650  *     return tree.xmlStrcmp(c_node_href, c_href) == 0             # <<<<<<<<<<<<<<
6651  * 
6652  * 
6653  */
6654   __pyx_r = (xmlStrcmp(__pyx_v_c_node_href, __pyx_v_c_href) == 0);
6655   goto __pyx_L0;
6656
6657   /* "lxml/objectify.pyx":379
6658  * 
6659  * 
6660  * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):             # <<<<<<<<<<<<<<
6661  *     if c_node.name != c_name:
6662  *         return 0
6663  */
6664
6665   /* function exit code */
6666   __pyx_L0:;
6667   __Pyx_RefNannyFinishContext();
6668   return __pyx_r;
6669 }
6670
6671 /* "lxml/objectify.pyx":390
6672  * 
6673  * 
6674  * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):             # <<<<<<<<<<<<<<
6675  *     cdef tree.xmlNode* c_node
6676  *     cdef Py_ssize_t count
6677  */
6678
6679 static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *__pyx_v_c_start_node) {
6680   xmlNode *__pyx_v_c_node;
6681   Py_ssize_t __pyx_v_count;
6682   const xmlChar *__pyx_v_c_tag;
6683   const xmlChar *__pyx_v_c_href;
6684   Py_ssize_t __pyx_r;
6685   __Pyx_RefNannyDeclarations
6686   const xmlChar *__pyx_t_1;
6687   xmlNode *__pyx_t_2;
6688   int __pyx_t_3;
6689   int __pyx_t_4;
6690   __Pyx_RefNannySetupContext("_countSiblings", 0);
6691
6692   /* "lxml/objectify.pyx":393
6693  *     cdef tree.xmlNode* c_node
6694  *     cdef Py_ssize_t count
6695  *     c_tag  = c_start_node.name             # <<<<<<<<<<<<<<
6696  *     c_href = tree._getNs(c_start_node)
6697  *     count = 1
6698  */
6699   __pyx_t_1 = __pyx_v_c_start_node->name;
6700   __pyx_v_c_tag = __pyx_t_1;
6701
6702   /* "lxml/objectify.pyx":394
6703  *     cdef Py_ssize_t count
6704  *     c_tag  = c_start_node.name
6705  *     c_href = tree._getNs(c_start_node)             # <<<<<<<<<<<<<<
6706  *     count = 1
6707  *     c_node = c_start_node.next
6708  */
6709   __pyx_v_c_href = _getNs(__pyx_v_c_start_node);
6710
6711   /* "lxml/objectify.pyx":395
6712  *     c_tag  = c_start_node.name
6713  *     c_href = tree._getNs(c_start_node)
6714  *     count = 1             # <<<<<<<<<<<<<<
6715  *     c_node = c_start_node.next
6716  *     while c_node is not NULL:
6717  */
6718   __pyx_v_count = 1;
6719
6720   /* "lxml/objectify.pyx":396
6721  *     c_href = tree._getNs(c_start_node)
6722  *     count = 1
6723  *     c_node = c_start_node.next             # <<<<<<<<<<<<<<
6724  *     while c_node is not NULL:
6725  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6726  */
6727   __pyx_t_2 = __pyx_v_c_start_node->next;
6728   __pyx_v_c_node = __pyx_t_2;
6729
6730   /* "lxml/objectify.pyx":397
6731  *     count = 1
6732  *     c_node = c_start_node.next
6733  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
6734  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6735  *                _tagMatches(c_node, c_href, c_tag):
6736  */
6737   while (1) {
6738     __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0);
6739     if (!__pyx_t_3) break;
6740
6741     /* "lxml/objectify.pyx":398
6742  *     c_node = c_start_node.next
6743  *     while c_node is not NULL:
6744  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6745  *                _tagMatches(c_node, c_href, c_tag):
6746  *             count += 1
6747  */
6748     __pyx_t_4 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
6749     if (__pyx_t_4) {
6750     } else {
6751       __pyx_t_3 = __pyx_t_4;
6752       goto __pyx_L6_bool_binop_done;
6753     }
6754
6755     /* "lxml/objectify.pyx":399
6756  *     while c_node is not NULL:
6757  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6758  *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
6759  *             count += 1
6760  *         c_node = c_node.next
6761  */
6762     __pyx_t_4 = (__pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag) != 0);
6763     __pyx_t_3 = __pyx_t_4;
6764     __pyx_L6_bool_binop_done:;
6765
6766     /* "lxml/objectify.pyx":398
6767  *     c_node = c_start_node.next
6768  *     while c_node is not NULL:
6769  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6770  *                _tagMatches(c_node, c_href, c_tag):
6771  *             count += 1
6772  */
6773     if (__pyx_t_3) {
6774
6775       /* "lxml/objectify.pyx":400
6776  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6777  *                _tagMatches(c_node, c_href, c_tag):
6778  *             count += 1             # <<<<<<<<<<<<<<
6779  *         c_node = c_node.next
6780  *     c_node = c_start_node.prev
6781  */
6782       __pyx_v_count = (__pyx_v_count + 1);
6783
6784       /* "lxml/objectify.pyx":398
6785  *     c_node = c_start_node.next
6786  *     while c_node is not NULL:
6787  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6788  *                _tagMatches(c_node, c_href, c_tag):
6789  *             count += 1
6790  */
6791     }
6792
6793     /* "lxml/objectify.pyx":401
6794  *                _tagMatches(c_node, c_href, c_tag):
6795  *             count += 1
6796  *         c_node = c_node.next             # <<<<<<<<<<<<<<
6797  *     c_node = c_start_node.prev
6798  *     while c_node is not NULL:
6799  */
6800     __pyx_t_2 = __pyx_v_c_node->next;
6801     __pyx_v_c_node = __pyx_t_2;
6802   }
6803
6804   /* "lxml/objectify.pyx":402
6805  *             count += 1
6806  *         c_node = c_node.next
6807  *     c_node = c_start_node.prev             # <<<<<<<<<<<<<<
6808  *     while c_node is not NULL:
6809  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6810  */
6811   __pyx_t_2 = __pyx_v_c_start_node->prev;
6812   __pyx_v_c_node = __pyx_t_2;
6813
6814   /* "lxml/objectify.pyx":403
6815  *         c_node = c_node.next
6816  *     c_node = c_start_node.prev
6817  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
6818  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6819  *                _tagMatches(c_node, c_href, c_tag):
6820  */
6821   while (1) {
6822     __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0);
6823     if (!__pyx_t_3) break;
6824
6825     /* "lxml/objectify.pyx":404
6826  *     c_node = c_start_node.prev
6827  *     while c_node is not NULL:
6828  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6829  *                _tagMatches(c_node, c_href, c_tag):
6830  *             count += 1
6831  */
6832     __pyx_t_4 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
6833     if (__pyx_t_4) {
6834     } else {
6835       __pyx_t_3 = __pyx_t_4;
6836       goto __pyx_L11_bool_binop_done;
6837     }
6838
6839     /* "lxml/objectify.pyx":405
6840  *     while c_node is not NULL:
6841  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6842  *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
6843  *             count += 1
6844  *         c_node = c_node.prev
6845  */
6846     __pyx_t_4 = (__pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag) != 0);
6847     __pyx_t_3 = __pyx_t_4;
6848     __pyx_L11_bool_binop_done:;
6849
6850     /* "lxml/objectify.pyx":404
6851  *     c_node = c_start_node.prev
6852  *     while c_node is not NULL:
6853  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6854  *                _tagMatches(c_node, c_href, c_tag):
6855  *             count += 1
6856  */
6857     if (__pyx_t_3) {
6858
6859       /* "lxml/objectify.pyx":406
6860  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6861  *                _tagMatches(c_node, c_href, c_tag):
6862  *             count += 1             # <<<<<<<<<<<<<<
6863  *         c_node = c_node.prev
6864  *     return count
6865  */
6866       __pyx_v_count = (__pyx_v_count + 1);
6867
6868       /* "lxml/objectify.pyx":404
6869  *     c_node = c_start_node.prev
6870  *     while c_node is not NULL:
6871  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6872  *                _tagMatches(c_node, c_href, c_tag):
6873  *             count += 1
6874  */
6875     }
6876
6877     /* "lxml/objectify.pyx":407
6878  *                _tagMatches(c_node, c_href, c_tag):
6879  *             count += 1
6880  *         c_node = c_node.prev             # <<<<<<<<<<<<<<
6881  *     return count
6882  * 
6883  */
6884     __pyx_t_2 = __pyx_v_c_node->prev;
6885     __pyx_v_c_node = __pyx_t_2;
6886   }
6887
6888   /* "lxml/objectify.pyx":408
6889  *             count += 1
6890  *         c_node = c_node.prev
6891  *     return count             # <<<<<<<<<<<<<<
6892  * 
6893  * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,
6894  */
6895   __pyx_r = __pyx_v_count;
6896   goto __pyx_L0;
6897
6898   /* "lxml/objectify.pyx":390
6899  * 
6900  * 
6901  * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):             # <<<<<<<<<<<<<<
6902  *     cdef tree.xmlNode* c_node
6903  *     cdef Py_ssize_t count
6904  */
6905
6906   /* function exit code */
6907   __pyx_L0:;
6908   __Pyx_RefNannyFinishContext();
6909   return __pyx_r;
6910 }
6911
6912 /* "lxml/objectify.pyx":410
6913  *     return count
6914  * 
6915  * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
6916  *                                          const_xmlChar* href, const_xmlChar* name,
6917  *                                          Py_ssize_t index):
6918  */
6919
6920 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) {
6921   xmlNode *(*__pyx_v_next)(xmlNode *);
6922   xmlNode *__pyx_r;
6923   __Pyx_RefNannyDeclarations
6924   int __pyx_t_1;
6925   int __pyx_t_2;
6926   __Pyx_RefNannySetupContext("_findFollowingSibling", 0);
6927
6928   /* "lxml/objectify.pyx":414
6929  *                                          Py_ssize_t index):
6930  *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
6931  *     if index >= 0:             # <<<<<<<<<<<<<<
6932  *         next = cetree.nextElement
6933  *     else:
6934  */
6935   __pyx_t_1 = ((__pyx_v_index >= 0) != 0);
6936   if (__pyx_t_1) {
6937
6938     /* "lxml/objectify.pyx":415
6939  *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
6940  *     if index >= 0:
6941  *         next = cetree.nextElement             # <<<<<<<<<<<<<<
6942  *     else:
6943  *         index = -1 - index
6944  */
6945     __pyx_v_next = nextElement;
6946
6947     /* "lxml/objectify.pyx":414
6948  *                                          Py_ssize_t index):
6949  *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
6950  *     if index >= 0:             # <<<<<<<<<<<<<<
6951  *         next = cetree.nextElement
6952  *     else:
6953  */
6954     goto __pyx_L3;
6955   }
6956
6957   /* "lxml/objectify.pyx":417
6958  *         next = cetree.nextElement
6959  *     else:
6960  *         index = -1 - index             # <<<<<<<<<<<<<<
6961  *         next = cetree.previousElement
6962  *     while c_node is not NULL:
6963  */
6964   /*else*/ {
6965     __pyx_v_index = (-1L - __pyx_v_index);
6966
6967     /* "lxml/objectify.pyx":418
6968  *     else:
6969  *         index = -1 - index
6970  *         next = cetree.previousElement             # <<<<<<<<<<<<<<
6971  *     while c_node is not NULL:
6972  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6973  */
6974     __pyx_v_next = previousElement;
6975   }
6976   __pyx_L3:;
6977
6978   /* "lxml/objectify.pyx":419
6979  *         index = -1 - index
6980  *         next = cetree.previousElement
6981  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
6982  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6983  *                _tagMatches(c_node, href, name):
6984  */
6985   while (1) {
6986     __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0);
6987     if (!__pyx_t_1) break;
6988
6989     /* "lxml/objectify.pyx":420
6990  *         next = cetree.previousElement
6991  *     while c_node is not NULL:
6992  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6993  *                _tagMatches(c_node, href, name):
6994  *             index = index - 1
6995  */
6996     __pyx_t_2 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
6997     if (__pyx_t_2) {
6998     } else {
6999       __pyx_t_1 = __pyx_t_2;
7000       goto __pyx_L7_bool_binop_done;
7001     }
7002
7003     /* "lxml/objectify.pyx":421
7004  *     while c_node is not NULL:
7005  *         if c_node.type == tree.XML_ELEMENT_NODE and \
7006  *                _tagMatches(c_node, href, name):             # <<<<<<<<<<<<<<
7007  *             index = index - 1
7008  *             if index < 0:
7009  */
7010     __pyx_t_2 = (__pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_href, __pyx_v_name) != 0);
7011     __pyx_t_1 = __pyx_t_2;
7012     __pyx_L7_bool_binop_done:;
7013
7014     /* "lxml/objectify.pyx":420
7015  *         next = cetree.previousElement
7016  *     while c_node is not NULL:
7017  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
7018  *                _tagMatches(c_node, href, name):
7019  *             index = index - 1
7020  */
7021     if (__pyx_t_1) {
7022
7023       /* "lxml/objectify.pyx":422
7024  *         if c_node.type == tree.XML_ELEMENT_NODE and \
7025  *                _tagMatches(c_node, href, name):
7026  *             index = index - 1             # <<<<<<<<<<<<<<
7027  *             if index < 0:
7028  *                 return c_node
7029  */
7030       __pyx_v_index = (__pyx_v_index - 1);
7031
7032       /* "lxml/objectify.pyx":423
7033  *                _tagMatches(c_node, href, name):
7034  *             index = index - 1
7035  *             if index < 0:             # <<<<<<<<<<<<<<
7036  *                 return c_node
7037  *         c_node = next(c_node)
7038  */
7039       __pyx_t_1 = ((__pyx_v_index < 0) != 0);
7040       if (__pyx_t_1) {
7041
7042         /* "lxml/objectify.pyx":424
7043  *             index = index - 1
7044  *             if index < 0:
7045  *                 return c_node             # <<<<<<<<<<<<<<
7046  *         c_node = next(c_node)
7047  *     return NULL
7048  */
7049         __pyx_r = __pyx_v_c_node;
7050         goto __pyx_L0;
7051
7052         /* "lxml/objectify.pyx":423
7053  *                _tagMatches(c_node, href, name):
7054  *             index = index - 1
7055  *             if index < 0:             # <<<<<<<<<<<<<<
7056  *                 return c_node
7057  *         c_node = next(c_node)
7058  */
7059       }
7060
7061       /* "lxml/objectify.pyx":420
7062  *         next = cetree.previousElement
7063  *     while c_node is not NULL:
7064  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
7065  *                _tagMatches(c_node, href, name):
7066  *             index = index - 1
7067  */
7068     }
7069
7070     /* "lxml/objectify.pyx":425
7071  *             if index < 0:
7072  *                 return c_node
7073  *         c_node = next(c_node)             # <<<<<<<<<<<<<<
7074  *     return NULL
7075  * 
7076  */
7077     __pyx_v_c_node = __pyx_v_next(__pyx_v_c_node);
7078   }
7079
7080   /* "lxml/objectify.pyx":426
7081  *                 return c_node
7082  *         c_node = next(c_node)
7083  *     return NULL             # <<<<<<<<<<<<<<
7084  * 
7085  * cdef object _lookupChild(_Element parent, tag):
7086  */
7087   __pyx_r = NULL;
7088   goto __pyx_L0;
7089
7090   /* "lxml/objectify.pyx":410
7091  *     return count
7092  * 
7093  * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
7094  *                                          const_xmlChar* href, const_xmlChar* name,
7095  *                                          Py_ssize_t index):
7096  */
7097
7098   /* function exit code */
7099   __pyx_L0:;
7100   __Pyx_RefNannyFinishContext();
7101   return __pyx_r;
7102 }
7103
7104 /* "lxml/objectify.pyx":428
7105  *     return NULL
7106  * 
7107  * cdef object _lookupChild(_Element parent, tag):             # <<<<<<<<<<<<<<
7108  *     cdef tree.xmlNode* c_result
7109  *     cdef tree.xmlNode* c_node
7110  */
7111
7112 static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
7113   xmlNode *__pyx_v_c_result;
7114   xmlNode *__pyx_v_c_node;
7115   PyObject *__pyx_v_ns = NULL;
7116   const xmlChar *__pyx_v_c_tag;
7117   const xmlChar *__pyx_v_c_href;
7118   PyObject *__pyx_r = NULL;
7119   __Pyx_RefNannyDeclarations
7120   xmlNode *__pyx_t_1;
7121   PyObject *__pyx_t_2 = NULL;
7122   PyObject *__pyx_t_3 = NULL;
7123   PyObject *__pyx_t_4 = NULL;
7124   int __pyx_t_5;
7125   int __pyx_t_6;
7126   const xmlChar *__pyx_t_7;
7127   const xmlChar *__pyx_t_8;
7128   int __pyx_lineno = 0;
7129   const char *__pyx_filename = NULL;
7130   int __pyx_clineno = 0;
7131   __Pyx_RefNannySetupContext("_lookupChild", 0);
7132   __Pyx_INCREF(__pyx_v_tag);
7133
7134   /* "lxml/objectify.pyx":431
7135  *     cdef tree.xmlNode* c_result
7136  *     cdef tree.xmlNode* c_node
7137  *     c_node = parent._c_node             # <<<<<<<<<<<<<<
7138  *     ns, tag = cetree.getNsTagWithEmptyNs(tag)
7139  *     c_tag = tree.xmlDictExists(
7140  */
7141   __pyx_t_1 = __pyx_v_parent->_c_node;
7142   __pyx_v_c_node = __pyx_t_1;
7143
7144   /* "lxml/objectify.pyx":432
7145  *     cdef tree.xmlNode* c_node
7146  *     c_node = parent._c_node
7147  *     ns, tag = cetree.getNsTagWithEmptyNs(tag)             # <<<<<<<<<<<<<<
7148  *     c_tag = tree.xmlDictExists(
7149  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7150  */
7151   __pyx_t_2 = getNsTagWithEmptyNs(__pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
7152   __Pyx_GOTREF(__pyx_t_2);
7153   if (likely(__pyx_t_2 != Py_None)) {
7154     PyObject* sequence = __pyx_t_2;
7155     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
7156     if (unlikely(size != 2)) {
7157       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
7158       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
7159       __PYX_ERR(0, 432, __pyx_L1_error)
7160     }
7161     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7162     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
7163     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
7164     __Pyx_INCREF(__pyx_t_3);
7165     __Pyx_INCREF(__pyx_t_4);
7166     #else
7167     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error)
7168     __Pyx_GOTREF(__pyx_t_3);
7169     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
7170     __Pyx_GOTREF(__pyx_t_4);
7171     #endif
7172     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7173   } else {
7174     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 432, __pyx_L1_error)
7175   }
7176   __pyx_v_ns = __pyx_t_3;
7177   __pyx_t_3 = 0;
7178   __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_4);
7179   __pyx_t_4 = 0;
7180
7181   /* "lxml/objectify.pyx":433
7182  *     c_node = parent._c_node
7183  *     ns, tag = cetree.getNsTagWithEmptyNs(tag)
7184  *     c_tag = tree.xmlDictExists(             # <<<<<<<<<<<<<<
7185  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7186  *     if c_tag is NULL:
7187  */
7188   __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));
7189
7190   /* "lxml/objectify.pyx":435
7191  *     c_tag = tree.xmlDictExists(
7192  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7193  *     if c_tag is NULL:             # <<<<<<<<<<<<<<
7194  *         return None # not in the hash map => not in the tree
7195  *     if ns is None:
7196  */
7197   __pyx_t_5 = ((__pyx_v_c_tag == NULL) != 0);
7198   if (__pyx_t_5) {
7199
7200     /* "lxml/objectify.pyx":436
7201  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7202  *     if c_tag is NULL:
7203  *         return None # not in the hash map => not in the tree             # <<<<<<<<<<<<<<
7204  *     if ns is None:
7205  *         # either inherit ns from parent or use empty (i.e. no) namespace
7206  */
7207     __Pyx_XDECREF(__pyx_r);
7208     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7209     goto __pyx_L0;
7210
7211     /* "lxml/objectify.pyx":435
7212  *     c_tag = tree.xmlDictExists(
7213  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7214  *     if c_tag is NULL:             # <<<<<<<<<<<<<<
7215  *         return None # not in the hash map => not in the tree
7216  *     if ns is None:
7217  */
7218   }
7219
7220   /* "lxml/objectify.pyx":437
7221  *     if c_tag is NULL:
7222  *         return None # not in the hash map => not in the tree
7223  *     if ns is None:             # <<<<<<<<<<<<<<
7224  *         # either inherit ns from parent or use empty (i.e. no) namespace
7225  *         c_href = tree._getNs(c_node) or <const_xmlChar*>''
7226  */
7227   __pyx_t_5 = (__pyx_v_ns == Py_None);
7228   __pyx_t_6 = (__pyx_t_5 != 0);
7229   if (__pyx_t_6) {
7230
7231     /* "lxml/objectify.pyx":439
7232  *     if ns is None:
7233  *         # either inherit ns from parent or use empty (i.e. no) namespace
7234  *         c_href = tree._getNs(c_node) or <const_xmlChar*>''             # <<<<<<<<<<<<<<
7235  *     else:
7236  *         c_href = _xcstr(ns)
7237  */
7238     __pyx_t_8 = _getNs(__pyx_v_c_node);
7239     if (!__pyx_t_8) {
7240     } else {
7241       __pyx_t_7 = __pyx_t_8;
7242       goto __pyx_L5_bool_binop_done;
7243     }
7244     __pyx_t_8 = ((const xmlChar *)((const xmlChar *)((char const *)"")));
7245     __pyx_t_7 = __pyx_t_8;
7246     __pyx_L5_bool_binop_done:;
7247     __pyx_v_c_href = __pyx_t_7;
7248
7249     /* "lxml/objectify.pyx":437
7250  *     if c_tag is NULL:
7251  *         return None # not in the hash map => not in the tree
7252  *     if ns is None:             # <<<<<<<<<<<<<<
7253  *         # either inherit ns from parent or use empty (i.e. no) namespace
7254  *         c_href = tree._getNs(c_node) or <const_xmlChar*>''
7255  */
7256     goto __pyx_L4;
7257   }
7258
7259   /* "lxml/objectify.pyx":441
7260  *         c_href = tree._getNs(c_node) or <const_xmlChar*>''
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  */
7266   /*else*/ {
7267     __pyx_v_c_href = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns);
7268   }
7269   __pyx_L4:;
7270
7271   /* "lxml/objectify.pyx":442
7272  *     else:
7273  *         c_href = _xcstr(ns)
7274  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)             # <<<<<<<<<<<<<<
7275  *     if c_result is NULL:
7276  *         return None
7277  */
7278   __pyx_v_c_result = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node->children, __pyx_v_c_href, __pyx_v_c_tag, 0);
7279
7280   /* "lxml/objectify.pyx":443
7281  *         c_href = _xcstr(ns)
7282  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
7283  *     if c_result is NULL:             # <<<<<<<<<<<<<<
7284  *         return None
7285  *     return elementFactory(parent._doc, c_result)
7286  */
7287   __pyx_t_6 = ((__pyx_v_c_result == NULL) != 0);
7288   if (__pyx_t_6) {
7289
7290     /* "lxml/objectify.pyx":444
7291  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
7292  *     if c_result is NULL:
7293  *         return None             # <<<<<<<<<<<<<<
7294  *     return elementFactory(parent._doc, c_result)
7295  * 
7296  */
7297     __Pyx_XDECREF(__pyx_r);
7298     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7299     goto __pyx_L0;
7300
7301     /* "lxml/objectify.pyx":443
7302  *         c_href = _xcstr(ns)
7303  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
7304  *     if c_result is NULL:             # <<<<<<<<<<<<<<
7305  *         return None
7306  *     return elementFactory(parent._doc, c_result)
7307  */
7308   }
7309
7310   /* "lxml/objectify.pyx":445
7311  *     if c_result is NULL:
7312  *         return None
7313  *     return elementFactory(parent._doc, c_result)             # <<<<<<<<<<<<<<
7314  * 
7315  * cdef object _lookupChildOrRaise(_Element parent, tag):
7316  */
7317   __Pyx_XDECREF(__pyx_r);
7318   __pyx_t_2 = ((PyObject *)__pyx_v_parent->_doc);
7319   __Pyx_INCREF(__pyx_t_2);
7320   __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)
7321   __Pyx_GOTREF(__pyx_t_4);
7322   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7323   __pyx_r = __pyx_t_4;
7324   __pyx_t_4 = 0;
7325   goto __pyx_L0;
7326
7327   /* "lxml/objectify.pyx":428
7328  *     return NULL
7329  * 
7330  * cdef object _lookupChild(_Element parent, tag):             # <<<<<<<<<<<<<<
7331  *     cdef tree.xmlNode* c_result
7332  *     cdef tree.xmlNode* c_node
7333  */
7334
7335   /* function exit code */
7336   __pyx_L1_error:;
7337   __Pyx_XDECREF(__pyx_t_2);
7338   __Pyx_XDECREF(__pyx_t_3);
7339   __Pyx_XDECREF(__pyx_t_4);
7340   __Pyx_AddTraceback("lxml.objectify._lookupChild", __pyx_clineno, __pyx_lineno, __pyx_filename);
7341   __pyx_r = 0;
7342   __pyx_L0:;
7343   __Pyx_XDECREF(__pyx_v_ns);
7344   __Pyx_XDECREF(__pyx_v_tag);
7345   __Pyx_XGIVEREF(__pyx_r);
7346   __Pyx_RefNannyFinishContext();
7347   return __pyx_r;
7348 }
7349
7350 /* "lxml/objectify.pyx":447
7351  *     return elementFactory(parent._doc, c_result)
7352  * 
7353  * cdef object _lookupChildOrRaise(_Element parent, tag):             # <<<<<<<<<<<<<<
7354  *     element = _lookupChild(parent, tag)
7355  *     if element is None:
7356  */
7357
7358 static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
7359   PyObject *__pyx_v_element = NULL;
7360   PyObject *__pyx_r = NULL;
7361   __Pyx_RefNannyDeclarations
7362   PyObject *__pyx_t_1 = NULL;
7363   int __pyx_t_2;
7364   int __pyx_t_3;
7365   PyObject *__pyx_t_4 = NULL;
7366   int __pyx_lineno = 0;
7367   const char *__pyx_filename = NULL;
7368   int __pyx_clineno = 0;
7369   __Pyx_RefNannySetupContext("_lookupChildOrRaise", 0);
7370
7371   /* "lxml/objectify.pyx":448
7372  * 
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  */
7378   __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)
7379   __Pyx_GOTREF(__pyx_t_1);
7380   __pyx_v_element = __pyx_t_1;
7381   __pyx_t_1 = 0;
7382
7383   /* "lxml/objectify.pyx":449
7384  * cdef object _lookupChildOrRaise(_Element parent, tag):
7385  *     element = _lookupChild(parent, tag)
7386  *     if element is None:             # <<<<<<<<<<<<<<
7387  *         raise AttributeError, u"no such child: " + _buildChildTag(parent, tag)
7388  *     return element
7389  */
7390   __pyx_t_2 = (__pyx_v_element == Py_None);
7391   __pyx_t_3 = (__pyx_t_2 != 0);
7392   if (unlikely(__pyx_t_3)) {
7393
7394     /* "lxml/objectify.pyx":450
7395  *     element = _lookupChild(parent, tag)
7396  *     if element is None:
7397  *         raise AttributeError, u"no such child: " + _buildChildTag(parent, tag)             # <<<<<<<<<<<<<<
7398  *     return element
7399  * 
7400  */
7401     __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)
7402     __Pyx_GOTREF(__pyx_t_1);
7403     __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)
7404     __Pyx_GOTREF(__pyx_t_4);
7405     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7406     __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_4, 0, 0);
7407     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7408     __PYX_ERR(0, 450, __pyx_L1_error)
7409
7410     /* "lxml/objectify.pyx":449
7411  * cdef object _lookupChildOrRaise(_Element parent, tag):
7412  *     element = _lookupChild(parent, tag)
7413  *     if element is None:             # <<<<<<<<<<<<<<
7414  *         raise AttributeError, u"no such child: " + _buildChildTag(parent, tag)
7415  *     return element
7416  */
7417   }
7418
7419   /* "lxml/objectify.pyx":451
7420  *     if element is None:
7421  *         raise AttributeError, u"no such child: " + _buildChildTag(parent, tag)
7422  *     return element             # <<<<<<<<<<<<<<
7423  * 
7424  * cdef object _buildChildTag(_Element parent, tag):
7425  */
7426   __Pyx_XDECREF(__pyx_r);
7427   __Pyx_INCREF(__pyx_v_element);
7428   __pyx_r = __pyx_v_element;
7429   goto __pyx_L0;
7430
7431   /* "lxml/objectify.pyx":447
7432  *     return elementFactory(parent._doc, c_result)
7433  * 
7434  * cdef object _lookupChildOrRaise(_Element parent, tag):             # <<<<<<<<<<<<<<
7435  *     element = _lookupChild(parent, tag)
7436  *     if element is None:
7437  */
7438
7439   /* function exit code */
7440   __pyx_L1_error:;
7441   __Pyx_XDECREF(__pyx_t_1);
7442   __Pyx_XDECREF(__pyx_t_4);
7443   __Pyx_AddTraceback("lxml.objectify._lookupChildOrRaise", __pyx_clineno, __pyx_lineno, __pyx_filename);
7444   __pyx_r = 0;
7445   __pyx_L0:;
7446   __Pyx_XDECREF(__pyx_v_element);
7447   __Pyx_XGIVEREF(__pyx_r);
7448   __Pyx_RefNannyFinishContext();
7449   return __pyx_r;
7450 }
7451
7452 /* "lxml/objectify.pyx":453
7453  *     return element
7454  * 
7455  * cdef object _buildChildTag(_Element parent, tag):             # <<<<<<<<<<<<<<
7456  *     ns, tag = cetree.getNsTag(tag)
7457  *     c_tag = _xcstr(tag)
7458  */
7459
7460 static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
7461   PyObject *__pyx_v_ns = NULL;
7462   const xmlChar *__pyx_v_c_tag;
7463   const xmlChar *__pyx_v_c_href;
7464   PyObject *__pyx_r = NULL;
7465   __Pyx_RefNannyDeclarations
7466   PyObject *__pyx_t_1 = NULL;
7467   PyObject *__pyx_t_2 = NULL;
7468   PyObject *__pyx_t_3 = NULL;
7469   const xmlChar *__pyx_t_4;
7470   int __pyx_t_5;
7471   int __pyx_lineno = 0;
7472   const char *__pyx_filename = NULL;
7473   int __pyx_clineno = 0;
7474   __Pyx_RefNannySetupContext("_buildChildTag", 0);
7475   __Pyx_INCREF(__pyx_v_tag);
7476
7477   /* "lxml/objectify.pyx":454
7478  * 
7479  * cdef object _buildChildTag(_Element parent, tag):
7480  *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<<
7481  *     c_tag = _xcstr(tag)
7482  *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)
7483  */
7484   __pyx_t_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
7485   __Pyx_GOTREF(__pyx_t_1);
7486   if (likely(__pyx_t_1 != Py_None)) {
7487     PyObject* sequence = __pyx_t_1;
7488     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
7489     if (unlikely(size != 2)) {
7490       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
7491       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
7492       __PYX_ERR(0, 454, __pyx_L1_error)
7493     }
7494     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7495     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
7496     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
7497     __Pyx_INCREF(__pyx_t_2);
7498     __Pyx_INCREF(__pyx_t_3);
7499     #else
7500     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
7501     __Pyx_GOTREF(__pyx_t_2);
7502     __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error)
7503     __Pyx_GOTREF(__pyx_t_3);
7504     #endif
7505     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7506   } else {
7507     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 454, __pyx_L1_error)
7508   }
7509   __pyx_v_ns = __pyx_t_2;
7510   __pyx_t_2 = 0;
7511   __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_3);
7512   __pyx_t_3 = 0;
7513
7514   /* "lxml/objectify.pyx":455
7515  * cdef object _buildChildTag(_Element parent, tag):
7516  *     ns, tag = cetree.getNsTag(tag)
7517  *     c_tag = _xcstr(tag)             # <<<<<<<<<<<<<<
7518  *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)
7519  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
7520  */
7521   __pyx_v_c_tag = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag);
7522
7523   /* "lxml/objectify.pyx":456
7524  *     ns, tag = cetree.getNsTag(tag)
7525  *     c_tag = _xcstr(tag)
7526  *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)             # <<<<<<<<<<<<<<
7527  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
7528  * 
7529  */
7530   __pyx_t_5 = (__pyx_v_ns == Py_None);
7531   if ((__pyx_t_5 != 0)) {
7532     __pyx_t_4 = _getNs(__pyx_v_parent->_c_node);
7533   } else {
7534     __pyx_t_4 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns);
7535   }
7536   __pyx_v_c_href = __pyx_t_4;
7537
7538   /* "lxml/objectify.pyx":457
7539  *     c_tag = _xcstr(tag)
7540  *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)
7541  *     return cetree.namespacedNameFromNsName(c_href, c_tag)             # <<<<<<<<<<<<<<
7542  * 
7543  * cdef _replaceElement(_Element element, value):
7544  */
7545   __Pyx_XDECREF(__pyx_r);
7546   __pyx_t_1 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
7547   __Pyx_GOTREF(__pyx_t_1);
7548   __pyx_r = __pyx_t_1;
7549   __pyx_t_1 = 0;
7550   goto __pyx_L0;
7551
7552   /* "lxml/objectify.pyx":453
7553  *     return element
7554  * 
7555  * cdef object _buildChildTag(_Element parent, tag):             # <<<<<<<<<<<<<<
7556  *     ns, tag = cetree.getNsTag(tag)
7557  *     c_tag = _xcstr(tag)
7558  */
7559
7560   /* function exit code */
7561   __pyx_L1_error:;
7562   __Pyx_XDECREF(__pyx_t_1);
7563   __Pyx_XDECREF(__pyx_t_2);
7564   __Pyx_XDECREF(__pyx_t_3);
7565   __Pyx_AddTraceback("lxml.objectify._buildChildTag", __pyx_clineno, __pyx_lineno, __pyx_filename);
7566   __pyx_r = 0;
7567   __pyx_L0:;
7568   __Pyx_XDECREF(__pyx_v_ns);
7569   __Pyx_XDECREF(__pyx_v_tag);
7570   __Pyx_XGIVEREF(__pyx_r);
7571   __Pyx_RefNannyFinishContext();
7572   return __pyx_r;
7573 }
7574
7575 /* "lxml/objectify.pyx":459
7576  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
7577  * 
7578  * cdef _replaceElement(_Element element, value):             # <<<<<<<<<<<<<<
7579  *     cdef _Element new_element
7580  *     if isinstance(value, _Element):
7581  */
7582
7583 static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
7584   struct LxmlElement *__pyx_v_new_element = 0;
7585   PyObject *__pyx_r = NULL;
7586   __Pyx_RefNannyDeclarations
7587   int __pyx_t_1;
7588   int __pyx_t_2;
7589   PyObject *__pyx_t_3 = NULL;
7590   PyObject *__pyx_t_4 = NULL;
7591   int __pyx_t_5;
7592   PyObject *__pyx_t_6 = NULL;
7593   PyObject *__pyx_t_7 = NULL;
7594   int __pyx_t_8;
7595   int __pyx_lineno = 0;
7596   const char *__pyx_filename = NULL;
7597   int __pyx_clineno = 0;
7598   __Pyx_RefNannySetupContext("_replaceElement", 0);
7599
7600   /* "lxml/objectify.pyx":461
7601  * cdef _replaceElement(_Element element, value):
7602  *     cdef _Element new_element
7603  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
7604  *         # deep copy the new element
7605  *         new_element = cetree.deepcopyNodeToDocument(
7606  */
7607   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
7608   __pyx_t_2 = (__pyx_t_1 != 0);
7609   if (__pyx_t_2) {
7610
7611     /* "lxml/objectify.pyx":464
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  *     elif isinstance(value, (list, tuple)):
7617  */
7618     __pyx_t_3 = ((PyObject *)__pyx_v_element->_doc);
7619     __Pyx_INCREF(__pyx_t_3);
7620
7621     /* "lxml/objectify.pyx":463
7622  *     if isinstance(value, _Element):
7623  *         # deep copy the new element
7624  *         new_element = cetree.deepcopyNodeToDocument(             # <<<<<<<<<<<<<<
7625  *             element._doc, (<_Element>value)._c_node)
7626  *         new_element.tag = element.tag
7627  */
7628     __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)
7629     __Pyx_GOTREF(__pyx_t_4);
7630     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7631     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_4);
7632     __pyx_t_4 = 0;
7633
7634     /* "lxml/objectify.pyx":465
7635  *         new_element = cetree.deepcopyNodeToDocument(
7636  *             element._doc, (<_Element>value)._c_node)
7637  *         new_element.tag = element.tag             # <<<<<<<<<<<<<<
7638  *     elif isinstance(value, (list, tuple)):
7639  *         element[:] = value
7640  */
7641     __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)
7642     __Pyx_GOTREF(__pyx_t_4);
7643     if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_new_element), __pyx_n_s_tag, __pyx_t_4) < 0) __PYX_ERR(0, 465, __pyx_L1_error)
7644     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7645
7646     /* "lxml/objectify.pyx":461
7647  * cdef _replaceElement(_Element element, value):
7648  *     cdef _Element new_element
7649  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
7650  *         # deep copy the new element
7651  *         new_element = cetree.deepcopyNodeToDocument(
7652  */
7653     goto __pyx_L3;
7654   }
7655
7656   /* "lxml/objectify.pyx":466
7657  *             element._doc, (<_Element>value)._c_node)
7658  *         new_element.tag = element.tag
7659  *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
7660  *         element[:] = value
7661  *         return
7662  */
7663   __pyx_t_1 = PyList_Check(__pyx_v_value); 
7664   __pyx_t_5 = (__pyx_t_1 != 0);
7665   if (!__pyx_t_5) {
7666   } else {
7667     __pyx_t_2 = __pyx_t_5;
7668     goto __pyx_L4_bool_binop_done;
7669   }
7670   __pyx_t_5 = PyTuple_Check(__pyx_v_value); 
7671   __pyx_t_1 = (__pyx_t_5 != 0);
7672   __pyx_t_2 = __pyx_t_1;
7673   __pyx_L4_bool_binop_done:;
7674   __pyx_t_1 = (__pyx_t_2 != 0);
7675   if (__pyx_t_1) {
7676
7677     /* "lxml/objectify.pyx":467
7678  *         new_element.tag = element.tag
7679  *     elif isinstance(value, (list, tuple)):
7680  *         element[:] = value             # <<<<<<<<<<<<<<
7681  *         return
7682  *     else:
7683  */
7684     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)
7685
7686     /* "lxml/objectify.pyx":468
7687  *     elif isinstance(value, (list, tuple)):
7688  *         element[:] = value
7689  *         return             # <<<<<<<<<<<<<<
7690  *     else:
7691  *         new_element = element.makeelement(element.tag)
7692  */
7693     __Pyx_XDECREF(__pyx_r);
7694     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7695     goto __pyx_L0;
7696
7697     /* "lxml/objectify.pyx":466
7698  *             element._doc, (<_Element>value)._c_node)
7699  *         new_element.tag = element.tag
7700  *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
7701  *         element[:] = value
7702  *         return
7703  */
7704   }
7705
7706   /* "lxml/objectify.pyx":470
7707  *         return
7708  *     else:
7709  *         new_element = element.makeelement(element.tag)             # <<<<<<<<<<<<<<
7710  *         _setElementValue(new_element, value)
7711  *     element.getparent().replace(element, new_element)
7712  */
7713   /*else*/ {
7714     __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)
7715     __Pyx_GOTREF(__pyx_t_3);
7716     __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)
7717     __Pyx_GOTREF(__pyx_t_6);
7718     __pyx_t_7 = NULL;
7719     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
7720       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
7721       if (likely(__pyx_t_7)) {
7722         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7723         __Pyx_INCREF(__pyx_t_7);
7724         __Pyx_INCREF(function);
7725         __Pyx_DECREF_SET(__pyx_t_3, function);
7726       }
7727     }
7728     __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);
7729     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7730     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7731     if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L1_error)
7732     __Pyx_GOTREF(__pyx_t_4);
7733     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7734     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)
7735     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_4);
7736     __pyx_t_4 = 0;
7737
7738     /* "lxml/objectify.pyx":471
7739  *     else:
7740  *         new_element = element.makeelement(element.tag)
7741  *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<<
7742  *     element.getparent().replace(element, new_element)
7743  * 
7744  */
7745     __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)
7746     __Pyx_GOTREF(__pyx_t_4);
7747     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7748   }
7749   __pyx_L3:;
7750
7751   /* "lxml/objectify.pyx":472
7752  *         new_element = element.makeelement(element.tag)
7753  *         _setElementValue(new_element, value)
7754  *     element.getparent().replace(element, new_element)             # <<<<<<<<<<<<<<
7755  * 
7756  * cdef _appendValue(_Element parent, tag, value):
7757  */
7758   __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)
7759   __Pyx_GOTREF(__pyx_t_6);
7760   __pyx_t_7 = NULL;
7761   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
7762     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
7763     if (likely(__pyx_t_7)) {
7764       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7765       __Pyx_INCREF(__pyx_t_7);
7766       __Pyx_INCREF(function);
7767       __Pyx_DECREF_SET(__pyx_t_6, function);
7768     }
7769   }
7770   __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
7771   __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7772   if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error)
7773   __Pyx_GOTREF(__pyx_t_3);
7774   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7775   __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)
7776   __Pyx_GOTREF(__pyx_t_6);
7777   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7778   __pyx_t_3 = NULL;
7779   __pyx_t_8 = 0;
7780   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
7781     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
7782     if (likely(__pyx_t_3)) {
7783       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7784       __Pyx_INCREF(__pyx_t_3);
7785       __Pyx_INCREF(function);
7786       __Pyx_DECREF_SET(__pyx_t_6, function);
7787       __pyx_t_8 = 1;
7788     }
7789   }
7790   #if CYTHON_FAST_PYCALL
7791   if (PyFunction_Check(__pyx_t_6)) {
7792     PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_element), ((PyObject *)__pyx_v_new_element)};
7793     __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)
7794     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7795     __Pyx_GOTREF(__pyx_t_4);
7796   } else
7797   #endif
7798   #if CYTHON_FAST_PYCCALL
7799   if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
7800     PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_element), ((PyObject *)__pyx_v_new_element)};
7801     __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)
7802     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7803     __Pyx_GOTREF(__pyx_t_4);
7804   } else
7805   #endif
7806   {
7807     __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 472, __pyx_L1_error)
7808     __Pyx_GOTREF(__pyx_t_7);
7809     if (__pyx_t_3) {
7810       __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
7811     }
7812     __Pyx_INCREF(((PyObject *)__pyx_v_element));
7813     __Pyx_GIVEREF(((PyObject *)__pyx_v_element));
7814     PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, ((PyObject *)__pyx_v_element));
7815     __Pyx_INCREF(((PyObject *)__pyx_v_new_element));
7816     __Pyx_GIVEREF(((PyObject *)__pyx_v_new_element));
7817     PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, ((PyObject *)__pyx_v_new_element));
7818     __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)
7819     __Pyx_GOTREF(__pyx_t_4);
7820     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7821   }
7822   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7823   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7824
7825   /* "lxml/objectify.pyx":459
7826  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
7827  * 
7828  * cdef _replaceElement(_Element element, value):             # <<<<<<<<<<<<<<
7829  *     cdef _Element new_element
7830  *     if isinstance(value, _Element):
7831  */
7832
7833   /* function exit code */
7834   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7835   goto __pyx_L0;
7836   __pyx_L1_error:;
7837   __Pyx_XDECREF(__pyx_t_3);
7838   __Pyx_XDECREF(__pyx_t_4);
7839   __Pyx_XDECREF(__pyx_t_6);
7840   __Pyx_XDECREF(__pyx_t_7);
7841   __Pyx_AddTraceback("lxml.objectify._replaceElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
7842   __pyx_r = 0;
7843   __pyx_L0:;
7844   __Pyx_XDECREF((PyObject *)__pyx_v_new_element);
7845   __Pyx_XGIVEREF(__pyx_r);
7846   __Pyx_RefNannyFinishContext();
7847   return __pyx_r;
7848 }
7849
7850 /* "lxml/objectify.pyx":474
7851  *     element.getparent().replace(element, new_element)
7852  * 
7853  * cdef _appendValue(_Element parent, tag, value):             # <<<<<<<<<<<<<<
7854  *     cdef _Element new_element
7855  *     if isinstance(value, _Element):
7856  */
7857
7858 static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
7859   struct LxmlElement *__pyx_v_new_element = 0;
7860   PyObject *__pyx_v_item = NULL;
7861   PyObject *__pyx_r = NULL;
7862   __Pyx_RefNannyDeclarations
7863   int __pyx_t_1;
7864   int __pyx_t_2;
7865   PyObject *__pyx_t_3 = NULL;
7866   PyObject *__pyx_t_4 = NULL;
7867   int __pyx_t_5;
7868   int __pyx_t_6;
7869   Py_ssize_t __pyx_t_7;
7870   PyObject *(*__pyx_t_8)(PyObject *);
7871   int __pyx_lineno = 0;
7872   const char *__pyx_filename = NULL;
7873   int __pyx_clineno = 0;
7874   __Pyx_RefNannySetupContext("_appendValue", 0);
7875
7876   /* "lxml/objectify.pyx":476
7877  * cdef _appendValue(_Element parent, tag, value):
7878  *     cdef _Element new_element
7879  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
7880  *         # deep copy the new element
7881  *         new_element = cetree.deepcopyNodeToDocument(
7882  */
7883   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
7884   __pyx_t_2 = (__pyx_t_1 != 0);
7885   if (__pyx_t_2) {
7886
7887     /* "lxml/objectify.pyx":479
7888  *         # deep copy the new element
7889  *         new_element = cetree.deepcopyNodeToDocument(
7890  *             parent._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<<
7891  *         new_element.tag = tag
7892  *         cetree.appendChildToElement(parent, new_element)
7893  */
7894     __pyx_t_3 = ((PyObject *)__pyx_v_parent->_doc);
7895     __Pyx_INCREF(__pyx_t_3);
7896
7897     /* "lxml/objectify.pyx":478
7898  *     if isinstance(value, _Element):
7899  *         # deep copy the new element
7900  *         new_element = cetree.deepcopyNodeToDocument(             # <<<<<<<<<<<<<<
7901  *             parent._doc, (<_Element>value)._c_node)
7902  *         new_element.tag = tag
7903  */
7904     __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)
7905     __Pyx_GOTREF(__pyx_t_4);
7906     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7907     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_4);
7908     __pyx_t_4 = 0;
7909
7910     /* "lxml/objectify.pyx":480
7911  *         new_element = cetree.deepcopyNodeToDocument(
7912  *             parent._doc, (<_Element>value)._c_node)
7913  *         new_element.tag = tag             # <<<<<<<<<<<<<<
7914  *         cetree.appendChildToElement(parent, new_element)
7915  *     elif isinstance(value, (list, tuple)):
7916  */
7917     if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_new_element), __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
7918
7919     /* "lxml/objectify.pyx":481
7920  *             parent._doc, (<_Element>value)._c_node)
7921  *         new_element.tag = tag
7922  *         cetree.appendChildToElement(parent, new_element)             # <<<<<<<<<<<<<<
7923  *     elif isinstance(value, (list, tuple)):
7924  *         for item in value:
7925  */
7926     __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)
7927
7928     /* "lxml/objectify.pyx":476
7929  * cdef _appendValue(_Element parent, tag, value):
7930  *     cdef _Element new_element
7931  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
7932  *         # deep copy the new element
7933  *         new_element = cetree.deepcopyNodeToDocument(
7934  */
7935     goto __pyx_L3;
7936   }
7937
7938   /* "lxml/objectify.pyx":482
7939  *         new_element.tag = tag
7940  *         cetree.appendChildToElement(parent, new_element)
7941  *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
7942  *         for item in value:
7943  *             _appendValue(parent, tag, item)
7944  */
7945   __pyx_t_1 = PyList_Check(__pyx_v_value); 
7946   __pyx_t_6 = (__pyx_t_1 != 0);
7947   if (!__pyx_t_6) {
7948   } else {
7949     __pyx_t_2 = __pyx_t_6;
7950     goto __pyx_L4_bool_binop_done;
7951   }
7952   __pyx_t_6 = PyTuple_Check(__pyx_v_value); 
7953   __pyx_t_1 = (__pyx_t_6 != 0);
7954   __pyx_t_2 = __pyx_t_1;
7955   __pyx_L4_bool_binop_done:;
7956   __pyx_t_1 = (__pyx_t_2 != 0);
7957   if (__pyx_t_1) {
7958
7959     /* "lxml/objectify.pyx":483
7960  *         cetree.appendChildToElement(parent, new_element)
7961  *     elif isinstance(value, (list, tuple)):
7962  *         for item in value:             # <<<<<<<<<<<<<<
7963  *             _appendValue(parent, tag, item)
7964  *     else:
7965  */
7966     if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
7967       __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
7968       __pyx_t_8 = NULL;
7969     } else {
7970       __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
7971       __Pyx_GOTREF(__pyx_t_4);
7972       __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 483, __pyx_L1_error)
7973     }
7974     for (;;) {
7975       if (likely(!__pyx_t_8)) {
7976         if (likely(PyList_CheckExact(__pyx_t_4))) {
7977           if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
7978           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7979           __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)
7980           #else
7981           __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)
7982           __Pyx_GOTREF(__pyx_t_3);
7983           #endif
7984         } else {
7985           if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
7986           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7987           __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)
7988           #else
7989           __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)
7990           __Pyx_GOTREF(__pyx_t_3);
7991           #endif
7992         }
7993       } else {
7994         __pyx_t_3 = __pyx_t_8(__pyx_t_4);
7995         if (unlikely(!__pyx_t_3)) {
7996           PyObject* exc_type = PyErr_Occurred();
7997           if (exc_type) {
7998             if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7999             else __PYX_ERR(0, 483, __pyx_L1_error)
8000           }
8001           break;
8002         }
8003         __Pyx_GOTREF(__pyx_t_3);
8004       }
8005       __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
8006       __pyx_t_3 = 0;
8007
8008       /* "lxml/objectify.pyx":484
8009  *     elif isinstance(value, (list, tuple)):
8010  *         for item in value:
8011  *             _appendValue(parent, tag, item)             # <<<<<<<<<<<<<<
8012  *     else:
8013  *         new_element = cetree.makeElement(
8014  */
8015       __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)
8016       __Pyx_GOTREF(__pyx_t_3);
8017       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8018
8019       /* "lxml/objectify.pyx":483
8020  *         cetree.appendChildToElement(parent, new_element)
8021  *     elif isinstance(value, (list, tuple)):
8022  *         for item in value:             # <<<<<<<<<<<<<<
8023  *             _appendValue(parent, tag, item)
8024  *     else:
8025  */
8026     }
8027     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8028
8029     /* "lxml/objectify.pyx":482
8030  *         new_element.tag = tag
8031  *         cetree.appendChildToElement(parent, new_element)
8032  *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
8033  *         for item in value:
8034  *             _appendValue(parent, tag, item)
8035  */
8036     goto __pyx_L3;
8037   }
8038
8039   /* "lxml/objectify.pyx":486
8040  *             _appendValue(parent, tag, item)
8041  *     else:
8042  *         new_element = cetree.makeElement(             # <<<<<<<<<<<<<<
8043  *             tag, parent._doc, None, None, None, None, None)
8044  *         _setElementValue(new_element, value)
8045  */
8046   /*else*/ {
8047
8048     /* "lxml/objectify.pyx":487
8049  *     else:
8050  *         new_element = cetree.makeElement(
8051  *             tag, parent._doc, None, None, None, None, None)             # <<<<<<<<<<<<<<
8052  *         _setElementValue(new_element, value)
8053  *         cetree.appendChildToElement(parent, new_element)
8054  */
8055     __pyx_t_4 = ((PyObject *)__pyx_v_parent->_doc);
8056     __Pyx_INCREF(__pyx_t_4);
8057
8058     /* "lxml/objectify.pyx":486
8059  *             _appendValue(parent, tag, item)
8060  *     else:
8061  *         new_element = cetree.makeElement(             # <<<<<<<<<<<<<<
8062  *             tag, parent._doc, None, None, None, None, None)
8063  *         _setElementValue(new_element, value)
8064  */
8065     __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)
8066     __Pyx_GOTREF(__pyx_t_3);
8067     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8068     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_3);
8069     __pyx_t_3 = 0;
8070
8071     /* "lxml/objectify.pyx":488
8072  *         new_element = cetree.makeElement(
8073  *             tag, parent._doc, None, None, None, None, None)
8074  *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<<
8075  *         cetree.appendChildToElement(parent, new_element)
8076  * 
8077  */
8078     __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)
8079     __Pyx_GOTREF(__pyx_t_3);
8080     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8081
8082     /* "lxml/objectify.pyx":489
8083  *             tag, parent._doc, None, None, None, None, None)
8084  *         _setElementValue(new_element, value)
8085  *         cetree.appendChildToElement(parent, new_element)             # <<<<<<<<<<<<<<
8086  * 
8087  * cdef _setElementValue(_Element element, value):
8088  */
8089     __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)
8090   }
8091   __pyx_L3:;
8092
8093   /* "lxml/objectify.pyx":474
8094  *     element.getparent().replace(element, new_element)
8095  * 
8096  * cdef _appendValue(_Element parent, tag, value):             # <<<<<<<<<<<<<<
8097  *     cdef _Element new_element
8098  *     if isinstance(value, _Element):
8099  */
8100
8101   /* function exit code */
8102   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8103   goto __pyx_L0;
8104   __pyx_L1_error:;
8105   __Pyx_XDECREF(__pyx_t_3);
8106   __Pyx_XDECREF(__pyx_t_4);
8107   __Pyx_AddTraceback("lxml.objectify._appendValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
8108   __pyx_r = 0;
8109   __pyx_L0:;
8110   __Pyx_XDECREF((PyObject *)__pyx_v_new_element);
8111   __Pyx_XDECREF(__pyx_v_item);
8112   __Pyx_XGIVEREF(__pyx_r);
8113   __Pyx_RefNannyFinishContext();
8114   return __pyx_r;
8115 }
8116
8117 /* "lxml/objectify.pyx":491
8118  *         cetree.appendChildToElement(parent, new_element)
8119  * 
8120  * cdef _setElementValue(_Element element, value):             # <<<<<<<<<<<<<<
8121  *     if value is None:
8122  *         cetree.setAttributeValue(
8123  */
8124
8125 static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
8126   PyObject *__pyx_v_pytype_name = NULL;
8127   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_py_type = NULL;
8128   PyObject *__pyx_r = NULL;
8129   __Pyx_RefNannyDeclarations
8130   int __pyx_t_1;
8131   int __pyx_t_2;
8132   PyObject *__pyx_t_3 = NULL;
8133   int __pyx_t_4;
8134   PyObject *__pyx_t_5 = NULL;
8135   PyObject *__pyx_t_6 = NULL;
8136   int __pyx_lineno = 0;
8137   const char *__pyx_filename = NULL;
8138   int __pyx_clineno = 0;
8139   __Pyx_RefNannySetupContext("_setElementValue", 0);
8140   __Pyx_INCREF(__pyx_v_value);
8141
8142   /* "lxml/objectify.pyx":492
8143  * 
8144  * cdef _setElementValue(_Element element, value):
8145  *     if value is None:             # <<<<<<<<<<<<<<
8146  *         cetree.setAttributeValue(
8147  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8148  */
8149   __pyx_t_1 = (__pyx_v_value == Py_None);
8150   __pyx_t_2 = (__pyx_t_1 != 0);
8151   if (__pyx_t_2) {
8152
8153     /* "lxml/objectify.pyx":494
8154  *     if value is None:
8155  *         cetree.setAttributeValue(
8156  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")             # <<<<<<<<<<<<<<
8157  *     elif isinstance(value, _Element):
8158  *         _replaceElement(element, value)
8159  */
8160     __pyx_t_3 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
8161     __Pyx_INCREF(__pyx_t_3);
8162
8163     /* "lxml/objectify.pyx":493
8164  * cdef _setElementValue(_Element element, value):
8165  *     if value is None:
8166  *         cetree.setAttributeValue(             # <<<<<<<<<<<<<<
8167  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8168  *     elif isinstance(value, _Element):
8169  */
8170     __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)
8171     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8172
8173     /* "lxml/objectify.pyx":492
8174  * 
8175  * cdef _setElementValue(_Element element, value):
8176  *     if value is None:             # <<<<<<<<<<<<<<
8177  *         cetree.setAttributeValue(
8178  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8179  */
8180     goto __pyx_L3;
8181   }
8182
8183   /* "lxml/objectify.pyx":495
8184  *         cetree.setAttributeValue(
8185  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8186  *     elif isinstance(value, _Element):             # <<<<<<<<<<<<<<
8187  *         _replaceElement(element, value)
8188  *         return
8189  */
8190   __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
8191   __pyx_t_1 = (__pyx_t_2 != 0);
8192   if (__pyx_t_1) {
8193
8194     /* "lxml/objectify.pyx":496
8195  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8196  *     elif isinstance(value, _Element):
8197  *         _replaceElement(element, value)             # <<<<<<<<<<<<<<
8198  *         return
8199  *     else:
8200  */
8201     __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)
8202     __Pyx_GOTREF(__pyx_t_3);
8203     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8204
8205     /* "lxml/objectify.pyx":497
8206  *     elif isinstance(value, _Element):
8207  *         _replaceElement(element, value)
8208  *         return             # <<<<<<<<<<<<<<
8209  *     else:
8210  *         cetree.delAttributeFromNsName(
8211  */
8212     __Pyx_XDECREF(__pyx_r);
8213     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8214     goto __pyx_L0;
8215
8216     /* "lxml/objectify.pyx":495
8217  *         cetree.setAttributeValue(
8218  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8219  *     elif isinstance(value, _Element):             # <<<<<<<<<<<<<<
8220  *         _replaceElement(element, value)
8221  *         return
8222  */
8223   }
8224
8225   /* "lxml/objectify.pyx":499
8226  *         return
8227  *     else:
8228  *         cetree.delAttributeFromNsName(             # <<<<<<<<<<<<<<
8229  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
8230  *         if python._isString(value):
8231  */
8232   /*else*/ {
8233
8234     /* "lxml/objectify.pyx":500
8235  *     else:
8236  *         cetree.delAttributeFromNsName(
8237  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")             # <<<<<<<<<<<<<<
8238  *         if python._isString(value):
8239  *             pytype_name = u"str"
8240  */
8241     (void)(delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"nil")))));
8242
8243     /* "lxml/objectify.pyx":501
8244  *         cetree.delAttributeFromNsName(
8245  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
8246  *         if python._isString(value):             # <<<<<<<<<<<<<<
8247  *             pytype_name = u"str"
8248  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8249  */
8250     __pyx_t_1 = (_isString(__pyx_v_value) != 0);
8251     if (__pyx_t_1) {
8252
8253       /* "lxml/objectify.pyx":502
8254  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
8255  *         if python._isString(value):
8256  *             pytype_name = u"str"             # <<<<<<<<<<<<<<
8257  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8258  *         else:
8259  */
8260       __Pyx_INCREF(__pyx_n_u_str);
8261       __pyx_v_pytype_name = __pyx_n_u_str;
8262
8263       /* "lxml/objectify.pyx":503
8264  *         if python._isString(value):
8265  *             pytype_name = u"str"
8266  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)             # <<<<<<<<<<<<<<
8267  *         else:
8268  *             pytype_name = _typename(value)
8269  */
8270       if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
8271         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
8272         __PYX_ERR(0, 503, __pyx_L1_error)
8273       }
8274       __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)
8275       __Pyx_GOTREF(__pyx_t_3);
8276       __pyx_t_5 = __pyx_t_3;
8277       __Pyx_INCREF(__pyx_t_5);
8278       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8279       __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_5);
8280       __pyx_t_5 = 0;
8281
8282       /* "lxml/objectify.pyx":501
8283  *         cetree.delAttributeFromNsName(
8284  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
8285  *         if python._isString(value):             # <<<<<<<<<<<<<<
8286  *             pytype_name = u"str"
8287  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8288  */
8289       goto __pyx_L4;
8290     }
8291
8292     /* "lxml/objectify.pyx":505
8293  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8294  *         else:
8295  *             pytype_name = _typename(value)             # <<<<<<<<<<<<<<
8296  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8297  *             if py_type is not None:
8298  */
8299     /*else*/ {
8300       __pyx_t_5 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
8301       __Pyx_GOTREF(__pyx_t_5);
8302       __pyx_v_pytype_name = __pyx_t_5;
8303       __pyx_t_5 = 0;
8304
8305       /* "lxml/objectify.pyx":506
8306  *         else:
8307  *             pytype_name = _typename(value)
8308  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)             # <<<<<<<<<<<<<<
8309  *             if py_type is not None:
8310  *                 value = py_type.stringify(value)
8311  */
8312       if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
8313         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
8314         __PYX_ERR(0, 506, __pyx_L1_error)
8315       }
8316       __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)
8317       __Pyx_GOTREF(__pyx_t_5);
8318       __pyx_t_3 = __pyx_t_5;
8319       __Pyx_INCREF(__pyx_t_3);
8320       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8321       __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3);
8322       __pyx_t_3 = 0;
8323
8324       /* "lxml/objectify.pyx":507
8325  *             pytype_name = _typename(value)
8326  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8327  *             if py_type is not None:             # <<<<<<<<<<<<<<
8328  *                 value = py_type.stringify(value)
8329  *             else:
8330  */
8331       __pyx_t_1 = (((PyObject *)__pyx_v_py_type) != Py_None);
8332       __pyx_t_2 = (__pyx_t_1 != 0);
8333       if (__pyx_t_2) {
8334
8335         /* "lxml/objectify.pyx":508
8336  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8337  *             if py_type is not None:
8338  *                 value = py_type.stringify(value)             # <<<<<<<<<<<<<<
8339  *             else:
8340  *                 value = unicode(value)
8341  */
8342         __Pyx_INCREF(__pyx_v_py_type->stringify);
8343         __pyx_t_5 = __pyx_v_py_type->stringify; __pyx_t_6 = NULL;
8344         if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
8345           __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
8346           if (likely(__pyx_t_6)) {
8347             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
8348             __Pyx_INCREF(__pyx_t_6);
8349             __Pyx_INCREF(function);
8350             __Pyx_DECREF_SET(__pyx_t_5, function);
8351           }
8352         }
8353         __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);
8354         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8355         if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error)
8356         __Pyx_GOTREF(__pyx_t_3);
8357         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8358         __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
8359         __pyx_t_3 = 0;
8360
8361         /* "lxml/objectify.pyx":507
8362  *             pytype_name = _typename(value)
8363  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8364  *             if py_type is not None:             # <<<<<<<<<<<<<<
8365  *                 value = py_type.stringify(value)
8366  *             else:
8367  */
8368         goto __pyx_L5;
8369       }
8370
8371       /* "lxml/objectify.pyx":510
8372  *                 value = py_type.stringify(value)
8373  *             else:
8374  *                 value = unicode(value)             # <<<<<<<<<<<<<<
8375  *         if py_type is not None:
8376  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
8377  */
8378       /*else*/ {
8379         __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 510, __pyx_L1_error)
8380         __Pyx_GOTREF(__pyx_t_3);
8381         __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
8382         __pyx_t_3 = 0;
8383       }
8384       __pyx_L5:;
8385     }
8386     __pyx_L4:;
8387
8388     /* "lxml/objectify.pyx":511
8389  *             else:
8390  *                 value = unicode(value)
8391  *         if py_type is not None:             # <<<<<<<<<<<<<<
8392  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
8393  *         else:
8394  */
8395     __pyx_t_2 = (((PyObject *)__pyx_v_py_type) != Py_None);
8396     __pyx_t_1 = (__pyx_t_2 != 0);
8397     if (__pyx_t_1) {
8398
8399       /* "lxml/objectify.pyx":512
8400  *                 value = unicode(value)
8401  *         if py_type is not None:
8402  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<<
8403  *         else:
8404  *             cetree.delAttributeFromNsName(
8405  */
8406       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
8407       __Pyx_GOTREF(__pyx_t_3);
8408       __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)
8409       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8410
8411       /* "lxml/objectify.pyx":511
8412  *             else:
8413  *                 value = unicode(value)
8414  *         if py_type is not None:             # <<<<<<<<<<<<<<
8415  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
8416  *         else:
8417  */
8418       goto __pyx_L6;
8419     }
8420
8421     /* "lxml/objectify.pyx":514
8422  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
8423  *         else:
8424  *             cetree.delAttributeFromNsName(             # <<<<<<<<<<<<<<
8425  *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
8426  *     cetree.setNodeText(element._c_node, value)
8427  */
8428     /*else*/ {
8429
8430       /* "lxml/objectify.pyx":515
8431  *         else:
8432  *             cetree.delAttributeFromNsName(
8433  *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
8434  *     cetree.setNodeText(element._c_node, value)
8435  * 
8436  */
8437       (void)(delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME));
8438     }
8439     __pyx_L6:;
8440   }
8441   __pyx_L3:;
8442
8443   /* "lxml/objectify.pyx":516
8444  *             cetree.delAttributeFromNsName(
8445  *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
8446  *     cetree.setNodeText(element._c_node, value)             # <<<<<<<<<<<<<<
8447  * 
8448  * cdef _setSlice(sliceobject, _Element target, items):
8449  */
8450   __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)
8451
8452   /* "lxml/objectify.pyx":491
8453  *         cetree.appendChildToElement(parent, new_element)
8454  * 
8455  * cdef _setElementValue(_Element element, value):             # <<<<<<<<<<<<<<
8456  *     if value is None:
8457  *         cetree.setAttributeValue(
8458  */
8459
8460   /* function exit code */
8461   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8462   goto __pyx_L0;
8463   __pyx_L1_error:;
8464   __Pyx_XDECREF(__pyx_t_3);
8465   __Pyx_XDECREF(__pyx_t_5);
8466   __Pyx_XDECREF(__pyx_t_6);
8467   __Pyx_AddTraceback("lxml.objectify._setElementValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
8468   __pyx_r = 0;
8469   __pyx_L0:;
8470   __Pyx_XDECREF(__pyx_v_pytype_name);
8471   __Pyx_XDECREF((PyObject *)__pyx_v_py_type);
8472   __Pyx_XDECREF(__pyx_v_value);
8473   __Pyx_XGIVEREF(__pyx_r);
8474   __Pyx_RefNannyFinishContext();
8475   return __pyx_r;
8476 }
8477
8478 /* "lxml/objectify.pyx":518
8479  *     cetree.setNodeText(element._c_node, value)
8480  * 
8481  * cdef _setSlice(sliceobject, _Element target, items):             # <<<<<<<<<<<<<<
8482  *     cdef _Element parent
8483  *     cdef tree.xmlNode* c_node
8484  */
8485
8486 static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *__pyx_v_sliceobject, struct LxmlElement *__pyx_v_target, PyObject *__pyx_v_items) {
8487   struct LxmlElement *__pyx_v_parent = 0;
8488   xmlNode *__pyx_v_c_node;
8489   Py_ssize_t __pyx_v_c_step;
8490   Py_ssize_t __pyx_v_pos;
8491   PyObject *__pyx_v_del_items = 0;
8492   PyObject *__pyx_v_new_items = NULL;
8493   PyObject *__pyx_v_tag = NULL;
8494   PyObject *__pyx_v_item = NULL;
8495   struct LxmlElement *__pyx_v_new_element = NULL;
8496   PyObject *__pyx_v_replace = NULL;
8497   PyObject *__pyx_v_remove = NULL;
8498   PyObject *__pyx_v_add = NULL;
8499   PyObject *__pyx_r = NULL;
8500   __Pyx_RefNannyDeclarations
8501   int __pyx_t_1;
8502   int __pyx_t_2;
8503   Py_ssize_t __pyx_t_3;
8504   PyObject *__pyx_t_4 = NULL;
8505   PyObject *(*__pyx_t_5)(PyObject *);
8506   PyObject *__pyx_t_6 = NULL;
8507   PyObject *__pyx_t_7 = NULL;
8508   int __pyx_t_8;
8509   Py_ssize_t __pyx_t_9;
8510   Py_UCS4 __pyx_t_10;
8511   PyObject *__pyx_t_11 = NULL;
8512   PyObject *__pyx_t_12 = NULL;
8513   int __pyx_t_13;
8514   PyObject *__pyx_t_14 = NULL;
8515   xmlNode *__pyx_t_15;
8516   int __pyx_lineno = 0;
8517   const char *__pyx_filename = NULL;
8518   int __pyx_clineno = 0;
8519   __Pyx_RefNannySetupContext("_setSlice", 0);
8520
8521   /* "lxml/objectify.pyx":523
8522  *     cdef Py_ssize_t c_step, c_start, pos
8523  *     # collect existing slice
8524  *     if (<slice>sliceobject).step is None:             # <<<<<<<<<<<<<<
8525  *         c_step = 1
8526  *     else:
8527  */
8528   __pyx_t_1 = (((PySliceObject*)((PyObject*)__pyx_v_sliceobject))->step == Py_None);
8529   __pyx_t_2 = (__pyx_t_1 != 0);
8530   if (__pyx_t_2) {
8531
8532     /* "lxml/objectify.pyx":524
8533  *     # collect existing slice
8534  *     if (<slice>sliceobject).step is None:
8535  *         c_step = 1             # <<<<<<<<<<<<<<
8536  *     else:
8537  *         c_step = (<slice>sliceobject).step
8538  */
8539     __pyx_v_c_step = 1;
8540
8541     /* "lxml/objectify.pyx":523
8542  *     cdef Py_ssize_t c_step, c_start, pos
8543  *     # collect existing slice
8544  *     if (<slice>sliceobject).step is None:             # <<<<<<<<<<<<<<
8545  *         c_step = 1
8546  *     else:
8547  */
8548     goto __pyx_L3;
8549   }
8550
8551   /* "lxml/objectify.pyx":526
8552  *         c_step = 1
8553  *     else:
8554  *         c_step = (<slice>sliceobject).step             # <<<<<<<<<<<<<<
8555  *     if c_step == 0:
8556  *         raise ValueError, u"Invalid slice"
8557  */
8558   /*else*/ {
8559     __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)
8560     __pyx_v_c_step = __pyx_t_3;
8561   }
8562   __pyx_L3:;
8563
8564   /* "lxml/objectify.pyx":527
8565  *     else:
8566  *         c_step = (<slice>sliceobject).step
8567  *     if c_step == 0:             # <<<<<<<<<<<<<<
8568  *         raise ValueError, u"Invalid slice"
8569  *     cdef list del_items = target[sliceobject]
8570  */
8571   __pyx_t_2 = ((__pyx_v_c_step == 0) != 0);
8572   if (unlikely(__pyx_t_2)) {
8573
8574     /* "lxml/objectify.pyx":528
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     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Invalid_slice, 0, 0);
8582     __PYX_ERR(0, 528, __pyx_L1_error)
8583
8584     /* "lxml/objectify.pyx":527
8585  *     else:
8586  *         c_step = (<slice>sliceobject).step
8587  *     if c_step == 0:             # <<<<<<<<<<<<<<
8588  *         raise ValueError, u"Invalid slice"
8589  *     cdef list del_items = target[sliceobject]
8590  */
8591   }
8592
8593   /* "lxml/objectify.pyx":529
8594  *     if c_step == 0:
8595  *         raise ValueError, u"Invalid slice"
8596  *     cdef list del_items = target[sliceobject]             # <<<<<<<<<<<<<<
8597  * 
8598  *     # collect new values
8599  */
8600   __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)
8601   __Pyx_GOTREF(__pyx_t_4);
8602   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)
8603   __pyx_v_del_items = ((PyObject*)__pyx_t_4);
8604   __pyx_t_4 = 0;
8605
8606   /* "lxml/objectify.pyx":532
8607  * 
8608  *     # collect new values
8609  *     new_items = []             # <<<<<<<<<<<<<<
8610  *     tag = target.tag
8611  *     for item in items:
8612  */
8613   __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
8614   __Pyx_GOTREF(__pyx_t_4);
8615   __pyx_v_new_items = ((PyObject*)__pyx_t_4);
8616   __pyx_t_4 = 0;
8617
8618   /* "lxml/objectify.pyx":533
8619  *     # collect new values
8620  *     new_items = []
8621  *     tag = target.tag             # <<<<<<<<<<<<<<
8622  *     for item in items:
8623  *         if isinstance(item, _Element):
8624  */
8625   __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)
8626   __Pyx_GOTREF(__pyx_t_4);
8627   __pyx_v_tag = __pyx_t_4;
8628   __pyx_t_4 = 0;
8629
8630   /* "lxml/objectify.pyx":534
8631  *     new_items = []
8632  *     tag = target.tag
8633  *     for item in items:             # <<<<<<<<<<<<<<
8634  *         if isinstance(item, _Element):
8635  *             # deep copy the new element
8636  */
8637   if (likely(PyList_CheckExact(__pyx_v_items)) || PyTuple_CheckExact(__pyx_v_items)) {
8638     __pyx_t_4 = __pyx_v_items; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
8639     __pyx_t_5 = NULL;
8640   } else {
8641     __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 534, __pyx_L1_error)
8642     __Pyx_GOTREF(__pyx_t_4);
8643     __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
8644   }
8645   for (;;) {
8646     if (likely(!__pyx_t_5)) {
8647       if (likely(PyList_CheckExact(__pyx_t_4))) {
8648         if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
8649         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8650         __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)
8651         #else
8652         __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)
8653         __Pyx_GOTREF(__pyx_t_6);
8654         #endif
8655       } else {
8656         if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
8657         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8658         __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)
8659         #else
8660         __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)
8661         __Pyx_GOTREF(__pyx_t_6);
8662         #endif
8663       }
8664     } else {
8665       __pyx_t_6 = __pyx_t_5(__pyx_t_4);
8666       if (unlikely(!__pyx_t_6)) {
8667         PyObject* exc_type = PyErr_Occurred();
8668         if (exc_type) {
8669           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8670           else __PYX_ERR(0, 534, __pyx_L1_error)
8671         }
8672         break;
8673       }
8674       __Pyx_GOTREF(__pyx_t_6);
8675     }
8676     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
8677     __pyx_t_6 = 0;
8678
8679     /* "lxml/objectify.pyx":535
8680  *     tag = target.tag
8681  *     for item in items:
8682  *         if isinstance(item, _Element):             # <<<<<<<<<<<<<<
8683  *             # deep copy the new element
8684  *             new_element = cetree.deepcopyNodeToDocument(
8685  */
8686     __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_item, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
8687     __pyx_t_1 = (__pyx_t_2 != 0);
8688     if (__pyx_t_1) {
8689
8690       /* "lxml/objectify.pyx":538
8691  *             # deep copy the new element
8692  *             new_element = cetree.deepcopyNodeToDocument(
8693  *                 target._doc, (<_Element>item)._c_node)             # <<<<<<<<<<<<<<
8694  *             new_element.tag = tag
8695  *         else:
8696  */
8697       __pyx_t_6 = ((PyObject *)__pyx_v_target->_doc);
8698       __Pyx_INCREF(__pyx_t_6);
8699
8700       /* "lxml/objectify.pyx":537
8701  *         if isinstance(item, _Element):
8702  *             # deep copy the new element
8703  *             new_element = cetree.deepcopyNodeToDocument(             # <<<<<<<<<<<<<<
8704  *                 target._doc, (<_Element>item)._c_node)
8705  *             new_element.tag = tag
8706  */
8707       __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)
8708       __Pyx_GOTREF(__pyx_t_7);
8709       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8710       __Pyx_XDECREF_SET(__pyx_v_new_element, ((struct LxmlElement *)__pyx_t_7));
8711       __pyx_t_7 = 0;
8712
8713       /* "lxml/objectify.pyx":539
8714  *             new_element = cetree.deepcopyNodeToDocument(
8715  *                 target._doc, (<_Element>item)._c_node)
8716  *             new_element.tag = tag             # <<<<<<<<<<<<<<
8717  *         else:
8718  *             new_element = cetree.makeElement(
8719  */
8720       if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_new_element), __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
8721
8722       /* "lxml/objectify.pyx":535
8723  *     tag = target.tag
8724  *     for item in items:
8725  *         if isinstance(item, _Element):             # <<<<<<<<<<<<<<
8726  *             # deep copy the new element
8727  *             new_element = cetree.deepcopyNodeToDocument(
8728  */
8729       goto __pyx_L7;
8730     }
8731
8732     /* "lxml/objectify.pyx":541
8733  *             new_element.tag = tag
8734  *         else:
8735  *             new_element = cetree.makeElement(             # <<<<<<<<<<<<<<
8736  *                 tag, target._doc, None, None, None, None, None)
8737  *             _setElementValue(new_element, item)
8738  */
8739     /*else*/ {
8740
8741       /* "lxml/objectify.pyx":542
8742  *         else:
8743  *             new_element = cetree.makeElement(
8744  *                 tag, target._doc, None, None, None, None, None)             # <<<<<<<<<<<<<<
8745  *             _setElementValue(new_element, item)
8746  *         new_items.append(new_element)
8747  */
8748       __pyx_t_7 = ((PyObject *)__pyx_v_target->_doc);
8749       __Pyx_INCREF(__pyx_t_7);
8750
8751       /* "lxml/objectify.pyx":541
8752  *             new_element.tag = tag
8753  *         else:
8754  *             new_element = cetree.makeElement(             # <<<<<<<<<<<<<<
8755  *                 tag, target._doc, None, None, None, None, None)
8756  *             _setElementValue(new_element, item)
8757  */
8758       __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)
8759       __Pyx_GOTREF(__pyx_t_6);
8760       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8761       __Pyx_XDECREF_SET(__pyx_v_new_element, ((struct LxmlElement *)__pyx_t_6));
8762       __pyx_t_6 = 0;
8763
8764       /* "lxml/objectify.pyx":543
8765  *             new_element = cetree.makeElement(
8766  *                 tag, target._doc, None, None, None, None, None)
8767  *             _setElementValue(new_element, item)             # <<<<<<<<<<<<<<
8768  *         new_items.append(new_element)
8769  * 
8770  */
8771       __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)
8772       __Pyx_GOTREF(__pyx_t_6);
8773       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8774     }
8775     __pyx_L7:;
8776
8777     /* "lxml/objectify.pyx":544
8778  *                 tag, target._doc, None, None, None, None, None)
8779  *             _setElementValue(new_element, item)
8780  *         new_items.append(new_element)             # <<<<<<<<<<<<<<
8781  * 
8782  *     # sanity check - raise what a list would raise
8783  */
8784     __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)
8785
8786     /* "lxml/objectify.pyx":534
8787  *     new_items = []
8788  *     tag = target.tag
8789  *     for item in items:             # <<<<<<<<<<<<<<
8790  *         if isinstance(item, _Element):
8791  *             # deep copy the new element
8792  */
8793   }
8794   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8795
8796   /* "lxml/objectify.pyx":547
8797  * 
8798  *     # sanity check - raise what a list would raise
8799  *     if c_step != 1 and len(del_items) != len(new_items):             # <<<<<<<<<<<<<<
8800  *         raise ValueError, \
8801  *             f"attempt to assign sequence of size {len(new_items)} to extended slice of size {len(del_items)}"
8802  */
8803   __pyx_t_2 = ((__pyx_v_c_step != 1) != 0);
8804   if (__pyx_t_2) {
8805   } else {
8806     __pyx_t_1 = __pyx_t_2;
8807     goto __pyx_L9_bool_binop_done;
8808   }
8809   if (unlikely(__pyx_v_del_items == Py_None)) {
8810     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
8811     __PYX_ERR(0, 547, __pyx_L1_error)
8812   }
8813   __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)
8814   __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)
8815   __pyx_t_2 = ((__pyx_t_3 != __pyx_t_9) != 0);
8816   __pyx_t_1 = __pyx_t_2;
8817   __pyx_L9_bool_binop_done:;
8818   if (unlikely(__pyx_t_1)) {
8819
8820     /* "lxml/objectify.pyx":549
8821  *     if c_step != 1 and len(del_items) != len(new_items):
8822  *         raise ValueError, \
8823  *             f"attempt to assign sequence of size {len(new_items)} to extended slice of size {len(del_items)}"             # <<<<<<<<<<<<<<
8824  * 
8825  *     # replace existing items
8826  */
8827     __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error)
8828     __Pyx_GOTREF(__pyx_t_4);
8829     __pyx_t_9 = 0;
8830     __pyx_t_10 = 127;
8831     __Pyx_INCREF(__pyx_kp_u_attempt_to_assign_sequence_of_si);
8832     __pyx_t_9 += 35;
8833     __Pyx_GIVEREF(__pyx_kp_u_attempt_to_assign_sequence_of_si);
8834     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_attempt_to_assign_sequence_of_si);
8835     __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)
8836     __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)
8837     __Pyx_GOTREF(__pyx_t_6);
8838     __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
8839     __Pyx_GIVEREF(__pyx_t_6);
8840     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
8841     __pyx_t_6 = 0;
8842     __Pyx_INCREF(__pyx_kp_u_to_extended_slice_of_size);
8843     __pyx_t_9 += 27;
8844     __Pyx_GIVEREF(__pyx_kp_u_to_extended_slice_of_size);
8845     PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_to_extended_slice_of_size);
8846     if (unlikely(__pyx_v_del_items == Py_None)) {
8847       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
8848       __PYX_ERR(0, 549, __pyx_L1_error)
8849     }
8850     __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)
8851     __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)
8852     __Pyx_GOTREF(__pyx_t_6);
8853     __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
8854     __Pyx_GIVEREF(__pyx_t_6);
8855     PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_6);
8856     __pyx_t_6 = 0;
8857     __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)
8858     __Pyx_GOTREF(__pyx_t_6);
8859     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8860     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
8861     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8862     __PYX_ERR(0, 548, __pyx_L1_error)
8863
8864     /* "lxml/objectify.pyx":547
8865  * 
8866  *     # sanity check - raise what a list would raise
8867  *     if c_step != 1 and len(del_items) != len(new_items):             # <<<<<<<<<<<<<<
8868  *         raise ValueError, \
8869  *             f"attempt to assign sequence of size {len(new_items)} to extended slice of size {len(del_items)}"
8870  */
8871   }
8872
8873   /* "lxml/objectify.pyx":552
8874  * 
8875  *     # replace existing items
8876  *     pos = 0             # <<<<<<<<<<<<<<
8877  *     parent = target.getparent()
8878  *     replace = parent.replace
8879  */
8880   __pyx_v_pos = 0;
8881
8882   /* "lxml/objectify.pyx":553
8883  *     # replace existing items
8884  *     pos = 0
8885  *     parent = target.getparent()             # <<<<<<<<<<<<<<
8886  *     replace = parent.replace
8887  *     while pos < len(new_items) and pos < len(del_items):
8888  */
8889   __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)
8890   __Pyx_GOTREF(__pyx_t_4);
8891   __pyx_t_7 = NULL;
8892   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
8893     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
8894     if (likely(__pyx_t_7)) {
8895       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
8896       __Pyx_INCREF(__pyx_t_7);
8897       __Pyx_INCREF(function);
8898       __Pyx_DECREF_SET(__pyx_t_4, function);
8899     }
8900   }
8901   __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
8902   __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8903   if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 553, __pyx_L1_error)
8904   __Pyx_GOTREF(__pyx_t_6);
8905   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8906   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)
8907   __pyx_v_parent = ((struct LxmlElement *)__pyx_t_6);
8908   __pyx_t_6 = 0;
8909
8910   /* "lxml/objectify.pyx":554
8911  *     pos = 0
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  */
8917   __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)
8918   __Pyx_GOTREF(__pyx_t_6);
8919   __pyx_v_replace = __pyx_t_6;
8920   __pyx_t_6 = 0;
8921
8922   /* "lxml/objectify.pyx":555
8923  *     parent = target.getparent()
8924  *     replace = parent.replace
8925  *     while pos < len(new_items) and pos < len(del_items):             # <<<<<<<<<<<<<<
8926  *         replace(del_items[pos], new_items[pos])
8927  *         pos += 1
8928  */
8929   while (1) {
8930     __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)
8931     __pyx_t_2 = ((__pyx_v_pos < __pyx_t_9) != 0);
8932     if (__pyx_t_2) {
8933     } else {
8934       __pyx_t_1 = __pyx_t_2;
8935       goto __pyx_L13_bool_binop_done;
8936     }
8937     if (unlikely(__pyx_v_del_items == Py_None)) {
8938       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
8939       __PYX_ERR(0, 555, __pyx_L1_error)
8940     }
8941     __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)
8942     __pyx_t_2 = ((__pyx_v_pos < __pyx_t_9) != 0);
8943     __pyx_t_1 = __pyx_t_2;
8944     __pyx_L13_bool_binop_done:;
8945     if (!__pyx_t_1) break;
8946
8947     /* "lxml/objectify.pyx":556
8948  *     replace = parent.replace
8949  *     while pos < len(new_items) and pos < len(del_items):
8950  *         replace(del_items[pos], new_items[pos])             # <<<<<<<<<<<<<<
8951  *         pos += 1
8952  *     # remove leftover items
8953  */
8954     if (unlikely(__pyx_v_del_items == Py_None)) {
8955       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
8956       __PYX_ERR(0, 556, __pyx_L1_error)
8957     }
8958     __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)
8959     __Pyx_GOTREF(__pyx_t_4);
8960     __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)
8961     __Pyx_GOTREF(__pyx_t_7);
8962     __Pyx_INCREF(__pyx_v_replace);
8963     __pyx_t_11 = __pyx_v_replace; __pyx_t_12 = NULL;
8964     __pyx_t_13 = 0;
8965     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
8966       __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
8967       if (likely(__pyx_t_12)) {
8968         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
8969         __Pyx_INCREF(__pyx_t_12);
8970         __Pyx_INCREF(function);
8971         __Pyx_DECREF_SET(__pyx_t_11, function);
8972         __pyx_t_13 = 1;
8973       }
8974     }
8975     #if CYTHON_FAST_PYCALL
8976     if (PyFunction_Check(__pyx_t_11)) {
8977       PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_4, __pyx_t_7};
8978       __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)
8979       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
8980       __Pyx_GOTREF(__pyx_t_6);
8981       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8982       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8983     } else
8984     #endif
8985     #if CYTHON_FAST_PYCCALL
8986     if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
8987       PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_4, __pyx_t_7};
8988       __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)
8989       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
8990       __Pyx_GOTREF(__pyx_t_6);
8991       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8992       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8993     } else
8994     #endif
8995     {
8996       __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 556, __pyx_L1_error)
8997       __Pyx_GOTREF(__pyx_t_14);
8998       if (__pyx_t_12) {
8999         __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
9000       }
9001       __Pyx_GIVEREF(__pyx_t_4);
9002       PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_4);
9003       __Pyx_GIVEREF(__pyx_t_7);
9004       PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_7);
9005       __pyx_t_4 = 0;
9006       __pyx_t_7 = 0;
9007       __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)
9008       __Pyx_GOTREF(__pyx_t_6);
9009       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9010     }
9011     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9012     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9013
9014     /* "lxml/objectify.pyx":557
9015  *     while pos < len(new_items) and pos < len(del_items):
9016  *         replace(del_items[pos], new_items[pos])
9017  *         pos += 1             # <<<<<<<<<<<<<<
9018  *     # remove leftover items
9019  *     if pos < len(del_items):
9020  */
9021     __pyx_v_pos = (__pyx_v_pos + 1);
9022   }
9023
9024   /* "lxml/objectify.pyx":559
9025  *         pos += 1
9026  *     # remove leftover items
9027  *     if pos < len(del_items):             # <<<<<<<<<<<<<<
9028  *         remove = parent.remove
9029  *         while pos < len(del_items):
9030  */
9031   if (unlikely(__pyx_v_del_items == Py_None)) {
9032     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
9033     __PYX_ERR(0, 559, __pyx_L1_error)
9034   }
9035   __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)
9036   __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9037   if (__pyx_t_1) {
9038
9039     /* "lxml/objectify.pyx":560
9040  *     # remove leftover items
9041  *     if pos < len(del_items):
9042  *         remove = parent.remove             # <<<<<<<<<<<<<<
9043  *         while pos < len(del_items):
9044  *             remove(del_items[pos])
9045  */
9046     __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)
9047     __Pyx_GOTREF(__pyx_t_6);
9048     __pyx_v_remove = __pyx_t_6;
9049     __pyx_t_6 = 0;
9050
9051     /* "lxml/objectify.pyx":561
9052  *     if pos < len(del_items):
9053  *         remove = parent.remove
9054  *         while pos < len(del_items):             # <<<<<<<<<<<<<<
9055  *             remove(del_items[pos])
9056  *             pos += 1
9057  */
9058     while (1) {
9059       if (unlikely(__pyx_v_del_items == Py_None)) {
9060         PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
9061         __PYX_ERR(0, 561, __pyx_L1_error)
9062       }
9063       __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)
9064       __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9065       if (!__pyx_t_1) break;
9066
9067       /* "lxml/objectify.pyx":562
9068  *         remove = parent.remove
9069  *         while pos < len(del_items):
9070  *             remove(del_items[pos])             # <<<<<<<<<<<<<<
9071  *             pos += 1
9072  *     # append remaining new items
9073  */
9074       if (unlikely(__pyx_v_del_items == Py_None)) {
9075         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
9076         __PYX_ERR(0, 562, __pyx_L1_error)
9077       }
9078       __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)
9079       __Pyx_GOTREF(__pyx_t_11);
9080       __Pyx_INCREF(__pyx_v_remove);
9081       __pyx_t_14 = __pyx_v_remove; __pyx_t_7 = NULL;
9082       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
9083         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_14);
9084         if (likely(__pyx_t_7)) {
9085           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
9086           __Pyx_INCREF(__pyx_t_7);
9087           __Pyx_INCREF(function);
9088           __Pyx_DECREF_SET(__pyx_t_14, function);
9089         }
9090       }
9091       __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);
9092       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9093       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9094       if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error)
9095       __Pyx_GOTREF(__pyx_t_6);
9096       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9097       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9098
9099       /* "lxml/objectify.pyx":563
9100  *         while pos < len(del_items):
9101  *             remove(del_items[pos])
9102  *             pos += 1             # <<<<<<<<<<<<<<
9103  *     # append remaining new items
9104  *     if pos < len(new_items):
9105  */
9106       __pyx_v_pos = (__pyx_v_pos + 1);
9107     }
9108
9109     /* "lxml/objectify.pyx":559
9110  *         pos += 1
9111  *     # remove leftover items
9112  *     if pos < len(del_items):             # <<<<<<<<<<<<<<
9113  *         remove = parent.remove
9114  *         while pos < len(del_items):
9115  */
9116   }
9117
9118   /* "lxml/objectify.pyx":565
9119  *             pos += 1
9120  *     # append remaining new items
9121  *     if pos < len(new_items):             # <<<<<<<<<<<<<<
9122  *         # the sanity check above guarantees (step == 1)
9123  *         if pos > 0:
9124  */
9125   __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)
9126   __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9127   if (__pyx_t_1) {
9128
9129     /* "lxml/objectify.pyx":567
9130  *     if pos < len(new_items):
9131  *         # the sanity check above guarantees (step == 1)
9132  *         if pos > 0:             # <<<<<<<<<<<<<<
9133  *             item = new_items[pos-1]
9134  *         else:
9135  */
9136     __pyx_t_1 = ((__pyx_v_pos > 0) != 0);
9137     if (__pyx_t_1) {
9138
9139       /* "lxml/objectify.pyx":568
9140  *         # the sanity check above guarantees (step == 1)
9141  *         if pos > 0:
9142  *             item = new_items[pos-1]             # <<<<<<<<<<<<<<
9143  *         else:
9144  *             if (<slice>sliceobject).start > 0:
9145  */
9146       __pyx_t_9 = (__pyx_v_pos - 1);
9147       __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)
9148       __Pyx_GOTREF(__pyx_t_6);
9149       __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
9150       __pyx_t_6 = 0;
9151
9152       /* "lxml/objectify.pyx":567
9153  *     if pos < len(new_items):
9154  *         # the sanity check above guarantees (step == 1)
9155  *         if pos > 0:             # <<<<<<<<<<<<<<
9156  *             item = new_items[pos-1]
9157  *         else:
9158  */
9159       goto __pyx_L19;
9160     }
9161
9162     /* "lxml/objectify.pyx":570
9163  *             item = new_items[pos-1]
9164  *         else:
9165  *             if (<slice>sliceobject).start > 0:             # <<<<<<<<<<<<<<
9166  *                 c_node = parent._c_node.children
9167  *             else:
9168  */
9169     /*else*/ {
9170       __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)
9171       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 570, __pyx_L1_error)
9172       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9173       if (__pyx_t_1) {
9174
9175         /* "lxml/objectify.pyx":571
9176  *         else:
9177  *             if (<slice>sliceobject).start > 0:
9178  *                 c_node = parent._c_node.children             # <<<<<<<<<<<<<<
9179  *             else:
9180  *                 c_node = parent._c_node.last
9181  */
9182         __pyx_t_15 = __pyx_v_parent->_c_node->children;
9183         __pyx_v_c_node = __pyx_t_15;
9184
9185         /* "lxml/objectify.pyx":570
9186  *             item = new_items[pos-1]
9187  *         else:
9188  *             if (<slice>sliceobject).start > 0:             # <<<<<<<<<<<<<<
9189  *                 c_node = parent._c_node.children
9190  *             else:
9191  */
9192         goto __pyx_L20;
9193       }
9194
9195       /* "lxml/objectify.pyx":573
9196  *                 c_node = parent._c_node.children
9197  *             else:
9198  *                 c_node = parent._c_node.last             # <<<<<<<<<<<<<<
9199  *             c_node = _findFollowingSibling(
9200  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9201  */
9202       /*else*/ {
9203         __pyx_t_15 = __pyx_v_parent->_c_node->last;
9204         __pyx_v_c_node = __pyx_t_15;
9205       }
9206       __pyx_L20:;
9207
9208       /* "lxml/objectify.pyx":576
9209  *             c_node = _findFollowingSibling(
9210  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9211  *                 (<slice>sliceobject).start - 1)             # <<<<<<<<<<<<<<
9212  *             if c_node is NULL:
9213  *                 while pos < len(new_items):
9214  */
9215       __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)
9216       __Pyx_GOTREF(__pyx_t_6);
9217       __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)
9218       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9219
9220       /* "lxml/objectify.pyx":574
9221  *             else:
9222  *                 c_node = parent._c_node.last
9223  *             c_node = _findFollowingSibling(             # <<<<<<<<<<<<<<
9224  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9225  *                 (<slice>sliceobject).start - 1)
9226  */
9227       __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);
9228
9229       /* "lxml/objectify.pyx":577
9230  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9231  *                 (<slice>sliceobject).start - 1)
9232  *             if c_node is NULL:             # <<<<<<<<<<<<<<
9233  *                 while pos < len(new_items):
9234  *                     cetree.appendChildToElement(parent, new_items[pos])
9235  */
9236       __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0);
9237       if (__pyx_t_1) {
9238
9239         /* "lxml/objectify.pyx":578
9240  *                 (<slice>sliceobject).start - 1)
9241  *             if c_node is NULL:
9242  *                 while pos < len(new_items):             # <<<<<<<<<<<<<<
9243  *                     cetree.appendChildToElement(parent, new_items[pos])
9244  *                     pos += 1
9245  */
9246         while (1) {
9247           __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)
9248           __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9249           if (!__pyx_t_1) break;
9250
9251           /* "lxml/objectify.pyx":579
9252  *             if c_node is NULL:
9253  *                 while pos < len(new_items):
9254  *                     cetree.appendChildToElement(parent, new_items[pos])             # <<<<<<<<<<<<<<
9255  *                     pos += 1
9256  *                 return
9257  */
9258           __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)
9259           __Pyx_GOTREF(__pyx_t_6);
9260           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)
9261           __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)
9262           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9263
9264           /* "lxml/objectify.pyx":580
9265  *                 while pos < len(new_items):
9266  *                     cetree.appendChildToElement(parent, new_items[pos])
9267  *                     pos += 1             # <<<<<<<<<<<<<<
9268  *                 return
9269  *             item = cetree.elementFactory(parent._doc, c_node)
9270  */
9271           __pyx_v_pos = (__pyx_v_pos + 1);
9272         }
9273
9274         /* "lxml/objectify.pyx":581
9275  *                     cetree.appendChildToElement(parent, new_items[pos])
9276  *                     pos += 1
9277  *                 return             # <<<<<<<<<<<<<<
9278  *             item = cetree.elementFactory(parent._doc, c_node)
9279  *         while pos < len(new_items):
9280  */
9281         __Pyx_XDECREF(__pyx_r);
9282         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9283         goto __pyx_L0;
9284
9285         /* "lxml/objectify.pyx":577
9286  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9287  *                 (<slice>sliceobject).start - 1)
9288  *             if c_node is NULL:             # <<<<<<<<<<<<<<
9289  *                 while pos < len(new_items):
9290  *                     cetree.appendChildToElement(parent, new_items[pos])
9291  */
9292       }
9293
9294       /* "lxml/objectify.pyx":582
9295  *                     pos += 1
9296  *                 return
9297  *             item = cetree.elementFactory(parent._doc, c_node)             # <<<<<<<<<<<<<<
9298  *         while pos < len(new_items):
9299  *             add = item.addnext
9300  */
9301       __pyx_t_6 = ((PyObject *)__pyx_v_parent->_doc);
9302       __Pyx_INCREF(__pyx_t_6);
9303       __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)
9304       __Pyx_GOTREF(__pyx_t_14);
9305       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9306       __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_14);
9307       __pyx_t_14 = 0;
9308     }
9309     __pyx_L19:;
9310
9311     /* "lxml/objectify.pyx":583
9312  *                 return
9313  *             item = cetree.elementFactory(parent._doc, c_node)
9314  *         while pos < len(new_items):             # <<<<<<<<<<<<<<
9315  *             add = item.addnext
9316  *             item = new_items[pos]
9317  */
9318     while (1) {
9319       __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)
9320       __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9321       if (!__pyx_t_1) break;
9322
9323       /* "lxml/objectify.pyx":584
9324  *             item = cetree.elementFactory(parent._doc, c_node)
9325  *         while pos < len(new_items):
9326  *             add = item.addnext             # <<<<<<<<<<<<<<
9327  *             item = new_items[pos]
9328  *             add(item)
9329  */
9330       __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)
9331       __Pyx_GOTREF(__pyx_t_14);
9332       __Pyx_XDECREF_SET(__pyx_v_add, __pyx_t_14);
9333       __pyx_t_14 = 0;
9334
9335       /* "lxml/objectify.pyx":585
9336  *         while pos < len(new_items):
9337  *             add = item.addnext
9338  *             item = new_items[pos]             # <<<<<<<<<<<<<<
9339  *             add(item)
9340  *             pos += 1
9341  */
9342       __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)
9343       __Pyx_GOTREF(__pyx_t_14);
9344       __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_14);
9345       __pyx_t_14 = 0;
9346
9347       /* "lxml/objectify.pyx":586
9348  *             add = item.addnext
9349  *             item = new_items[pos]
9350  *             add(item)             # <<<<<<<<<<<<<<
9351  *             pos += 1
9352  * 
9353  */
9354       __Pyx_INCREF(__pyx_v_add);
9355       __pyx_t_6 = __pyx_v_add; __pyx_t_11 = NULL;
9356       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
9357         __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
9358         if (likely(__pyx_t_11)) {
9359           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
9360           __Pyx_INCREF(__pyx_t_11);
9361           __Pyx_INCREF(function);
9362           __Pyx_DECREF_SET(__pyx_t_6, function);
9363         }
9364       }
9365       __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);
9366       __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
9367       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 586, __pyx_L1_error)
9368       __Pyx_GOTREF(__pyx_t_14);
9369       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9370       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9371
9372       /* "lxml/objectify.pyx":587
9373  *             item = new_items[pos]
9374  *             add(item)
9375  *             pos += 1             # <<<<<<<<<<<<<<
9376  * 
9377  * ################################################################################
9378  */
9379       __pyx_v_pos = (__pyx_v_pos + 1);
9380     }
9381
9382     /* "lxml/objectify.pyx":565
9383  *             pos += 1
9384  *     # append remaining new items
9385  *     if pos < len(new_items):             # <<<<<<<<<<<<<<
9386  *         # the sanity check above guarantees (step == 1)
9387  *         if pos > 0:
9388  */
9389   }
9390
9391   /* "lxml/objectify.pyx":518
9392  *     cetree.setNodeText(element._c_node, value)
9393  * 
9394  * cdef _setSlice(sliceobject, _Element target, items):             # <<<<<<<<<<<<<<
9395  *     cdef _Element parent
9396  *     cdef tree.xmlNode* c_node
9397  */
9398
9399   /* function exit code */
9400   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9401   goto __pyx_L0;
9402   __pyx_L1_error:;
9403   __Pyx_XDECREF(__pyx_t_4);
9404   __Pyx_XDECREF(__pyx_t_6);
9405   __Pyx_XDECREF(__pyx_t_7);
9406   __Pyx_XDECREF(__pyx_t_11);
9407   __Pyx_XDECREF(__pyx_t_12);
9408   __Pyx_XDECREF(__pyx_t_14);
9409   __Pyx_AddTraceback("lxml.objectify._setSlice", __pyx_clineno, __pyx_lineno, __pyx_filename);
9410   __pyx_r = 0;
9411   __pyx_L0:;
9412   __Pyx_XDECREF((PyObject *)__pyx_v_parent);
9413   __Pyx_XDECREF(__pyx_v_del_items);
9414   __Pyx_XDECREF(__pyx_v_new_items);
9415   __Pyx_XDECREF(__pyx_v_tag);
9416   __Pyx_XDECREF(__pyx_v_item);
9417   __Pyx_XDECREF((PyObject *)__pyx_v_new_element);
9418   __Pyx_XDECREF(__pyx_v_replace);
9419   __Pyx_XDECREF(__pyx_v_remove);
9420   __Pyx_XDECREF(__pyx_v_add);
9421   __Pyx_XGIVEREF(__pyx_r);
9422   __Pyx_RefNannyFinishContext();
9423   return __pyx_r;
9424 }
9425
9426 /* "lxml/objectify.pyx":597
9427  *     """
9428  *     @property
9429  *     def pyval(self):             # <<<<<<<<<<<<<<
9430  *         return textOf(self._c_node)
9431  * 
9432  */
9433
9434 /* Python wrapper */
9435 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
9436 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5pyval_1__get__(PyObject *__pyx_v_self) {
9437   PyObject *__pyx_r = 0;
9438   __Pyx_RefNannyDeclarations
9439   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9440   __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self));
9441
9442   /* function exit code */
9443   __Pyx_RefNannyFinishContext();
9444   return __pyx_r;
9445 }
9446
9447 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self) {
9448   PyObject *__pyx_r = NULL;
9449   __Pyx_RefNannyDeclarations
9450   PyObject *__pyx_t_1 = NULL;
9451   int __pyx_lineno = 0;
9452   const char *__pyx_filename = NULL;
9453   int __pyx_clineno = 0;
9454   __Pyx_RefNannySetupContext("__get__", 0);
9455
9456   /* "lxml/objectify.pyx":598
9457  *     @property
9458  *     def pyval(self):
9459  *         return textOf(self._c_node)             # <<<<<<<<<<<<<<
9460  * 
9461  *     def __str__(self):
9462  */
9463   __Pyx_XDECREF(__pyx_r);
9464   __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)
9465   __Pyx_GOTREF(__pyx_t_1);
9466   __pyx_r = __pyx_t_1;
9467   __pyx_t_1 = 0;
9468   goto __pyx_L0;
9469
9470   /* "lxml/objectify.pyx":597
9471  *     """
9472  *     @property
9473  *     def pyval(self):             # <<<<<<<<<<<<<<
9474  *         return textOf(self._c_node)
9475  * 
9476  */
9477
9478   /* function exit code */
9479   __pyx_L1_error:;
9480   __Pyx_XDECREF(__pyx_t_1);
9481   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9482   __pyx_r = NULL;
9483   __pyx_L0:;
9484   __Pyx_XGIVEREF(__pyx_r);
9485   __Pyx_RefNannyFinishContext();
9486   return __pyx_r;
9487 }
9488
9489 /* "lxml/objectify.pyx":600
9490  *         return textOf(self._c_node)
9491  * 
9492  *     def __str__(self):             # <<<<<<<<<<<<<<
9493  *         return textOf(self._c_node) or ''
9494  * 
9495  */
9496
9497 /* Python wrapper */
9498 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__(PyObject *__pyx_v_self); /*proto*/
9499 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__(PyObject *__pyx_v_self) {
9500   PyObject *__pyx_r = 0;
9501   __Pyx_RefNannyDeclarations
9502   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
9503   __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self));
9504
9505   /* function exit code */
9506   __Pyx_RefNannyFinishContext();
9507   return __pyx_r;
9508 }
9509
9510 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self) {
9511   PyObject *__pyx_r = NULL;
9512   __Pyx_RefNannyDeclarations
9513   PyObject *__pyx_t_1 = NULL;
9514   PyObject *__pyx_t_2 = NULL;
9515   int __pyx_t_3;
9516   int __pyx_lineno = 0;
9517   const char *__pyx_filename = NULL;
9518   int __pyx_clineno = 0;
9519   __Pyx_RefNannySetupContext("__str__", 0);
9520
9521   /* "lxml/objectify.pyx":601
9522  * 
9523  *     def __str__(self):
9524  *         return textOf(self._c_node) or ''             # <<<<<<<<<<<<<<
9525  * 
9526  *     def __repr__(self):
9527  */
9528   __Pyx_XDECREF(__pyx_r);
9529   __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)
9530   __Pyx_GOTREF(__pyx_t_2);
9531   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 601, __pyx_L1_error)
9532   if (!__pyx_t_3) {
9533     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9534   } else {
9535     __Pyx_INCREF(__pyx_t_2);
9536     __pyx_t_1 = __pyx_t_2;
9537     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9538     goto __pyx_L3_bool_binop_done;
9539   }
9540   __Pyx_INCREF(__pyx_kp_s_);
9541   __pyx_t_1 = __pyx_kp_s_;
9542   __pyx_L3_bool_binop_done:;
9543   __pyx_r = __pyx_t_1;
9544   __pyx_t_1 = 0;
9545   goto __pyx_L0;
9546
9547   /* "lxml/objectify.pyx":600
9548  *         return textOf(self._c_node)
9549  * 
9550  *     def __str__(self):             # <<<<<<<<<<<<<<
9551  *         return textOf(self._c_node) or ''
9552  * 
9553  */
9554
9555   /* function exit code */
9556   __pyx_L1_error:;
9557   __Pyx_XDECREF(__pyx_t_1);
9558   __Pyx_XDECREF(__pyx_t_2);
9559   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9560   __pyx_r = NULL;
9561   __pyx_L0:;
9562   __Pyx_XGIVEREF(__pyx_r);
9563   __Pyx_RefNannyFinishContext();
9564   return __pyx_r;
9565 }
9566
9567 /* "lxml/objectify.pyx":603
9568  *         return textOf(self._c_node) or ''
9569  * 
9570  *     def __repr__(self):             # <<<<<<<<<<<<<<
9571  *         return strrepr(textOf(self._c_node) or '')
9572  * 
9573  */
9574
9575 /* Python wrapper */
9576 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_3__repr__(PyObject *__pyx_v_self); /*proto*/
9577 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_3__repr__(PyObject *__pyx_v_self) {
9578   PyObject *__pyx_r = 0;
9579   __Pyx_RefNannyDeclarations
9580   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
9581   __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_2__repr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self));
9582
9583   /* function exit code */
9584   __Pyx_RefNannyFinishContext();
9585   return __pyx_r;
9586 }
9587
9588 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_2__repr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self) {
9589   PyObject *__pyx_r = NULL;
9590   __Pyx_RefNannyDeclarations
9591   PyObject *__pyx_t_1 = NULL;
9592   PyObject *__pyx_t_2 = NULL;
9593   int __pyx_t_3;
9594   int __pyx_lineno = 0;
9595   const char *__pyx_filename = NULL;
9596   int __pyx_clineno = 0;
9597   __Pyx_RefNannySetupContext("__repr__", 0);
9598
9599   /* "lxml/objectify.pyx":604
9600  * 
9601  *     def __repr__(self):
9602  *         return strrepr(textOf(self._c_node) or '')             # <<<<<<<<<<<<<<
9603  * 
9604  *     def _setText(self, s):
9605  */
9606   __Pyx_XDECREF(__pyx_r);
9607   __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)
9608   __Pyx_GOTREF(__pyx_t_2);
9609   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 604, __pyx_L1_error)
9610   if (!__pyx_t_3) {
9611     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9612   } else {
9613     __Pyx_INCREF(__pyx_t_2);
9614     __pyx_t_1 = __pyx_t_2;
9615     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9616     goto __pyx_L3_bool_binop_done;
9617   }
9618   __Pyx_INCREF(__pyx_kp_s_);
9619   __pyx_t_1 = __pyx_kp_s_;
9620   __pyx_L3_bool_binop_done:;
9621   __pyx_t_2 = __pyx_f_4lxml_9objectify_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
9622   __Pyx_GOTREF(__pyx_t_2);
9623   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9624   __pyx_r = __pyx_t_2;
9625   __pyx_t_2 = 0;
9626   goto __pyx_L0;
9627
9628   /* "lxml/objectify.pyx":603
9629  *         return textOf(self._c_node) or ''
9630  * 
9631  *     def __repr__(self):             # <<<<<<<<<<<<<<
9632  *         return strrepr(textOf(self._c_node) or '')
9633  * 
9634  */
9635
9636   /* function exit code */
9637   __pyx_L1_error:;
9638   __Pyx_XDECREF(__pyx_t_1);
9639   __Pyx_XDECREF(__pyx_t_2);
9640   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9641   __pyx_r = NULL;
9642   __pyx_L0:;
9643   __Pyx_XGIVEREF(__pyx_r);
9644   __Pyx_RefNannyFinishContext();
9645   return __pyx_r;
9646 }
9647
9648 /* "lxml/objectify.pyx":606
9649  *         return strrepr(textOf(self._c_node) or '')
9650  * 
9651  *     def _setText(self, s):             # <<<<<<<<<<<<<<
9652  *         u"""For use in subclasses only. Don't use unless you know what you are
9653  *         doing.
9654  */
9655
9656 /* Python wrapper */
9657 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
9658 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        ";
9659 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};
9660 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s) {
9661   PyObject *__pyx_r = 0;
9662   __Pyx_RefNannyDeclarations
9663   __Pyx_RefNannySetupContext("_setText (wrapper)", 0);
9664   __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_4_setText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self), ((PyObject *)__pyx_v_s));
9665
9666   /* function exit code */
9667   __Pyx_RefNannyFinishContext();
9668   return __pyx_r;
9669 }
9670
9671 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_4_setText(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self, PyObject *__pyx_v_s) {
9672   PyObject *__pyx_r = NULL;
9673   __Pyx_RefNannyDeclarations
9674   int __pyx_t_1;
9675   int __pyx_lineno = 0;
9676   const char *__pyx_filename = NULL;
9677   int __pyx_clineno = 0;
9678   __Pyx_RefNannySetupContext("_setText", 0);
9679
9680   /* "lxml/objectify.pyx":610
9681  *         doing.
9682  *         """
9683  *         cetree.setNodeText(self._c_node, s)             # <<<<<<<<<<<<<<
9684  * 
9685  * cdef class NumberElement(ObjectifiedDataElement):
9686  */
9687   __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)
9688
9689   /* "lxml/objectify.pyx":606
9690  *         return strrepr(textOf(self._c_node) or '')
9691  * 
9692  *     def _setText(self, s):             # <<<<<<<<<<<<<<
9693  *         u"""For use in subclasses only. Don't use unless you know what you are
9694  *         doing.
9695  */
9696
9697   /* function exit code */
9698   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9699   goto __pyx_L0;
9700   __pyx_L1_error:;
9701   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement._setText", __pyx_clineno, __pyx_lineno, __pyx_filename);
9702   __pyx_r = NULL;
9703   __pyx_L0:;
9704   __Pyx_XGIVEREF(__pyx_r);
9705   __Pyx_RefNannyFinishContext();
9706   return __pyx_r;
9707 }
9708
9709 /* "lxml/objectify.pyx":614
9710  * cdef class NumberElement(ObjectifiedDataElement):
9711  *     cdef object _parse_value
9712  *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
9713  *         u"""Set the function that parses the Python value from a string.
9714  * 
9715  */
9716
9717 /* Python wrapper */
9718 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function); /*proto*/
9719 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        ";
9720 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};
9721 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
9722   PyObject *__pyx_r = 0;
9723   __Pyx_RefNannyDeclarations
9724   __Pyx_RefNannySetupContext("_setValueParser (wrapper)", 0);
9725   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self), ((PyObject *)__pyx_v_function));
9726
9727   /* function exit code */
9728   __Pyx_RefNannyFinishContext();
9729   return __pyx_r;
9730 }
9731
9732 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self, PyObject *__pyx_v_function) {
9733   PyObject *__pyx_r = NULL;
9734   __Pyx_RefNannyDeclarations
9735   __Pyx_RefNannySetupContext("_setValueParser", 0);
9736
9737   /* "lxml/objectify.pyx":619
9738  *         Do not use this unless you know what you are doing.
9739  *         """
9740  *         self._parse_value = function             # <<<<<<<<<<<<<<
9741  * 
9742  *     @property
9743  */
9744   __Pyx_INCREF(__pyx_v_function);
9745   __Pyx_GIVEREF(__pyx_v_function);
9746   __Pyx_GOTREF(__pyx_v_self->_parse_value);
9747   __Pyx_DECREF(__pyx_v_self->_parse_value);
9748   __pyx_v_self->_parse_value = __pyx_v_function;
9749
9750   /* "lxml/objectify.pyx":614
9751  * cdef class NumberElement(ObjectifiedDataElement):
9752  *     cdef object _parse_value
9753  *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
9754  *         u"""Set the function that parses the Python value from a string.
9755  * 
9756  */
9757
9758   /* function exit code */
9759   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9760   __Pyx_XGIVEREF(__pyx_r);
9761   __Pyx_RefNannyFinishContext();
9762   return __pyx_r;
9763 }
9764
9765 /* "lxml/objectify.pyx":622
9766  * 
9767  *     @property
9768  *     def pyval(self):             # <<<<<<<<<<<<<<
9769  *         return _parseNumber(self)
9770  * 
9771  */
9772
9773 /* Python wrapper */
9774 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
9775 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5pyval_1__get__(PyObject *__pyx_v_self) {
9776   PyObject *__pyx_r = 0;
9777   __Pyx_RefNannyDeclarations
9778   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9779   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
9780
9781   /* function exit code */
9782   __Pyx_RefNannyFinishContext();
9783   return __pyx_r;
9784 }
9785
9786 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
9787   PyObject *__pyx_r = NULL;
9788   __Pyx_RefNannyDeclarations
9789   PyObject *__pyx_t_1 = NULL;
9790   int __pyx_lineno = 0;
9791   const char *__pyx_filename = NULL;
9792   int __pyx_clineno = 0;
9793   __Pyx_RefNannySetupContext("__get__", 0);
9794
9795   /* "lxml/objectify.pyx":623
9796  *     @property
9797  *     def pyval(self):
9798  *         return _parseNumber(self)             # <<<<<<<<<<<<<<
9799  * 
9800  *     def __int__(self):
9801  */
9802   __Pyx_XDECREF(__pyx_r);
9803   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
9804   __Pyx_GOTREF(__pyx_t_1);
9805   __pyx_r = __pyx_t_1;
9806   __pyx_t_1 = 0;
9807   goto __pyx_L0;
9808
9809   /* "lxml/objectify.pyx":622
9810  * 
9811  *     @property
9812  *     def pyval(self):             # <<<<<<<<<<<<<<
9813  *         return _parseNumber(self)
9814  * 
9815  */
9816
9817   /* function exit code */
9818   __pyx_L1_error:;
9819   __Pyx_XDECREF(__pyx_t_1);
9820   __Pyx_AddTraceback("lxml.objectify.NumberElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9821   __pyx_r = NULL;
9822   __pyx_L0:;
9823   __Pyx_XGIVEREF(__pyx_r);
9824   __Pyx_RefNannyFinishContext();
9825   return __pyx_r;
9826 }
9827
9828 /* "lxml/objectify.pyx":625
9829  *         return _parseNumber(self)
9830  * 
9831  *     def __int__(self):             # <<<<<<<<<<<<<<
9832  *         return int(_parseNumber(self))
9833  * 
9834  */
9835
9836 /* Python wrapper */
9837 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_3__int__(PyObject *__pyx_v_self); /*proto*/
9838 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_3__int__(PyObject *__pyx_v_self) {
9839   PyObject *__pyx_r = 0;
9840   __Pyx_RefNannyDeclarations
9841   __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
9842   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_2__int__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
9843
9844   /* function exit code */
9845   __Pyx_RefNannyFinishContext();
9846   return __pyx_r;
9847 }
9848
9849 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_2__int__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
9850   PyObject *__pyx_r = NULL;
9851   __Pyx_RefNannyDeclarations
9852   PyObject *__pyx_t_1 = NULL;
9853   PyObject *__pyx_t_2 = NULL;
9854   int __pyx_lineno = 0;
9855   const char *__pyx_filename = NULL;
9856   int __pyx_clineno = 0;
9857   __Pyx_RefNannySetupContext("__int__", 0);
9858
9859   /* "lxml/objectify.pyx":626
9860  * 
9861  *     def __int__(self):
9862  *         return int(_parseNumber(self))             # <<<<<<<<<<<<<<
9863  * 
9864  *     def __long__(self):
9865  */
9866   __Pyx_XDECREF(__pyx_r);
9867   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
9868   __Pyx_GOTREF(__pyx_t_1);
9869   __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
9870   __Pyx_GOTREF(__pyx_t_2);
9871   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9872   __pyx_r = __pyx_t_2;
9873   __pyx_t_2 = 0;
9874   goto __pyx_L0;
9875
9876   /* "lxml/objectify.pyx":625
9877  *         return _parseNumber(self)
9878  * 
9879  *     def __int__(self):             # <<<<<<<<<<<<<<
9880  *         return int(_parseNumber(self))
9881  * 
9882  */
9883
9884   /* function exit code */
9885   __pyx_L1_error:;
9886   __Pyx_XDECREF(__pyx_t_1);
9887   __Pyx_XDECREF(__pyx_t_2);
9888   __Pyx_AddTraceback("lxml.objectify.NumberElement.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9889   __pyx_r = NULL;
9890   __pyx_L0:;
9891   __Pyx_XGIVEREF(__pyx_r);
9892   __Pyx_RefNannyFinishContext();
9893   return __pyx_r;
9894 }
9895
9896 /* "lxml/objectify.pyx":628
9897  *         return int(_parseNumber(self))
9898  * 
9899  *     def __long__(self):             # <<<<<<<<<<<<<<
9900  *         return long(_parseNumber(self))
9901  * 
9902  */
9903
9904 /* Python wrapper */
9905 #if PY_MAJOR_VERSION < 3
9906 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5__long__(PyObject *__pyx_v_self); /*proto*/
9907 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5__long__(PyObject *__pyx_v_self) {
9908   PyObject *__pyx_r = 0;
9909   __Pyx_RefNannyDeclarations
9910   __Pyx_RefNannySetupContext("__long__ (wrapper)", 0);
9911   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_4__long__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
9912
9913   /* function exit code */
9914   __Pyx_RefNannyFinishContext();
9915   return __pyx_r;
9916 }
9917 #endif /*!(#if PY_MAJOR_VERSION < 3)*/
9918
9919 #if PY_MAJOR_VERSION < 3
9920 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_4__long__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
9921   PyObject *__pyx_r = NULL;
9922   __Pyx_RefNannyDeclarations
9923   PyObject *__pyx_t_1 = NULL;
9924   PyObject *__pyx_t_2 = NULL;
9925   int __pyx_lineno = 0;
9926   const char *__pyx_filename = NULL;
9927   int __pyx_clineno = 0;
9928   __Pyx_RefNannySetupContext("__long__", 0);
9929
9930   /* "lxml/objectify.pyx":629
9931  * 
9932  *     def __long__(self):
9933  *         return long(_parseNumber(self))             # <<<<<<<<<<<<<<
9934  * 
9935  *     def __float__(self):
9936  */
9937   __Pyx_XDECREF(__pyx_r);
9938   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
9939   __Pyx_GOTREF(__pyx_t_1);
9940   __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyLong_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
9941   __Pyx_GOTREF(__pyx_t_2);
9942   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9943   __pyx_r = __pyx_t_2;
9944   __pyx_t_2 = 0;
9945   goto __pyx_L0;
9946
9947   /* "lxml/objectify.pyx":628
9948  *         return int(_parseNumber(self))
9949  * 
9950  *     def __long__(self):             # <<<<<<<<<<<<<<
9951  *         return long(_parseNumber(self))
9952  * 
9953  */
9954
9955   /* function exit code */
9956   __pyx_L1_error:;
9957   __Pyx_XDECREF(__pyx_t_1);
9958   __Pyx_XDECREF(__pyx_t_2);
9959   __Pyx_AddTraceback("lxml.objectify.NumberElement.__long__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9960   __pyx_r = NULL;
9961   __pyx_L0:;
9962   __Pyx_XGIVEREF(__pyx_r);
9963   __Pyx_RefNannyFinishContext();
9964   return __pyx_r;
9965 }
9966 #endif /*!(#if PY_MAJOR_VERSION < 3)*/
9967
9968 /* "lxml/objectify.pyx":631
9969  *         return long(_parseNumber(self))
9970  * 
9971  *     def __float__(self):             # <<<<<<<<<<<<<<
9972  *         return float(_parseNumber(self))
9973  * 
9974  */
9975
9976 /* Python wrapper */
9977 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_7__float__(PyObject *__pyx_v_self); /*proto*/
9978 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_7__float__(PyObject *__pyx_v_self) {
9979   PyObject *__pyx_r = 0;
9980   __Pyx_RefNannyDeclarations
9981   __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
9982   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_6__float__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
9983
9984   /* function exit code */
9985   __Pyx_RefNannyFinishContext();
9986   return __pyx_r;
9987 }
9988
9989 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_6__float__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
9990   PyObject *__pyx_r = NULL;
9991   __Pyx_RefNannyDeclarations
9992   PyObject *__pyx_t_1 = NULL;
9993   PyObject *__pyx_t_2 = NULL;
9994   int __pyx_lineno = 0;
9995   const char *__pyx_filename = NULL;
9996   int __pyx_clineno = 0;
9997   __Pyx_RefNannySetupContext("__float__", 0);
9998
9999   /* "lxml/objectify.pyx":632
10000  * 
10001  *     def __float__(self):
10002  *         return float(_parseNumber(self))             # <<<<<<<<<<<<<<
10003  * 
10004  *     def __complex__(self):
10005  */
10006   __Pyx_XDECREF(__pyx_r);
10007   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error)
10008   __Pyx_GOTREF(__pyx_t_1);
10009   __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error)
10010   __Pyx_GOTREF(__pyx_t_2);
10011   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10012   __pyx_r = __pyx_t_2;
10013   __pyx_t_2 = 0;
10014   goto __pyx_L0;
10015
10016   /* "lxml/objectify.pyx":631
10017  *         return long(_parseNumber(self))
10018  * 
10019  *     def __float__(self):             # <<<<<<<<<<<<<<
10020  *         return float(_parseNumber(self))
10021  * 
10022  */
10023
10024   /* function exit code */
10025   __pyx_L1_error:;
10026   __Pyx_XDECREF(__pyx_t_1);
10027   __Pyx_XDECREF(__pyx_t_2);
10028   __Pyx_AddTraceback("lxml.objectify.NumberElement.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10029   __pyx_r = NULL;
10030   __pyx_L0:;
10031   __Pyx_XGIVEREF(__pyx_r);
10032   __Pyx_RefNannyFinishContext();
10033   return __pyx_r;
10034 }
10035
10036 /* "lxml/objectify.pyx":634
10037  *         return float(_parseNumber(self))
10038  * 
10039  *     def __complex__(self):             # <<<<<<<<<<<<<<
10040  *         return complex(_parseNumber(self))
10041  * 
10042  */
10043
10044 /* Python wrapper */
10045 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10046 static PyMethodDef __pyx_mdef_4lxml_9objectify_13NumberElement_9__complex__ = {"__complex__", (PyCFunction)__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__, METH_NOARGS, 0};
10047 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10048   PyObject *__pyx_r = 0;
10049   __Pyx_RefNannyDeclarations
10050   __Pyx_RefNannySetupContext("__complex__ (wrapper)", 0);
10051   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_8__complex__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10052
10053   /* function exit code */
10054   __Pyx_RefNannyFinishContext();
10055   return __pyx_r;
10056 }
10057
10058 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_8__complex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10059   PyObject *__pyx_r = NULL;
10060   __Pyx_RefNannyDeclarations
10061   PyObject *__pyx_t_1 = NULL;
10062   PyObject *__pyx_t_2 = NULL;
10063   int __pyx_lineno = 0;
10064   const char *__pyx_filename = NULL;
10065   int __pyx_clineno = 0;
10066   __Pyx_RefNannySetupContext("__complex__", 0);
10067
10068   /* "lxml/objectify.pyx":635
10069  * 
10070  *     def __complex__(self):
10071  *         return complex(_parseNumber(self))             # <<<<<<<<<<<<<<
10072  * 
10073  *     def __str__(self):
10074  */
10075   __Pyx_XDECREF(__pyx_r);
10076   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
10077   __Pyx_GOTREF(__pyx_t_1);
10078   __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyComplex_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error)
10079   __Pyx_GOTREF(__pyx_t_2);
10080   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10081   __pyx_r = __pyx_t_2;
10082   __pyx_t_2 = 0;
10083   goto __pyx_L0;
10084
10085   /* "lxml/objectify.pyx":634
10086  *         return float(_parseNumber(self))
10087  * 
10088  *     def __complex__(self):             # <<<<<<<<<<<<<<
10089  *         return complex(_parseNumber(self))
10090  * 
10091  */
10092
10093   /* function exit code */
10094   __pyx_L1_error:;
10095   __Pyx_XDECREF(__pyx_t_1);
10096   __Pyx_XDECREF(__pyx_t_2);
10097   __Pyx_AddTraceback("lxml.objectify.NumberElement.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10098   __pyx_r = NULL;
10099   __pyx_L0:;
10100   __Pyx_XGIVEREF(__pyx_r);
10101   __Pyx_RefNannyFinishContext();
10102   return __pyx_r;
10103 }
10104
10105 /* "lxml/objectify.pyx":637
10106  *         return complex(_parseNumber(self))
10107  * 
10108  *     def __str__(self):             # <<<<<<<<<<<<<<
10109  *         return unicode(_parseNumber(self))
10110  * 
10111  */
10112
10113 /* Python wrapper */
10114 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_11__str__(PyObject *__pyx_v_self); /*proto*/
10115 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_11__str__(PyObject *__pyx_v_self) {
10116   PyObject *__pyx_r = 0;
10117   __Pyx_RefNannyDeclarations
10118   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10119   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_10__str__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10120
10121   /* function exit code */
10122   __Pyx_RefNannyFinishContext();
10123   return __pyx_r;
10124 }
10125
10126 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_10__str__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10127   PyObject *__pyx_r = NULL;
10128   __Pyx_RefNannyDeclarations
10129   PyObject *__pyx_t_1 = NULL;
10130   PyObject *__pyx_t_2 = NULL;
10131   int __pyx_lineno = 0;
10132   const char *__pyx_filename = NULL;
10133   int __pyx_clineno = 0;
10134   __Pyx_RefNannySetupContext("__str__", 0);
10135
10136   /* "lxml/objectify.pyx":638
10137  * 
10138  *     def __str__(self):
10139  *         return unicode(_parseNumber(self))             # <<<<<<<<<<<<<<
10140  * 
10141  *     def __repr__(self):
10142  */
10143   __Pyx_XDECREF(__pyx_r);
10144   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
10145   __Pyx_GOTREF(__pyx_t_1);
10146   __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
10147   __Pyx_GOTREF(__pyx_t_2);
10148   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10149   __pyx_r = __pyx_t_2;
10150   __pyx_t_2 = 0;
10151   goto __pyx_L0;
10152
10153   /* "lxml/objectify.pyx":637
10154  *         return complex(_parseNumber(self))
10155  * 
10156  *     def __str__(self):             # <<<<<<<<<<<<<<
10157  *         return unicode(_parseNumber(self))
10158  * 
10159  */
10160
10161   /* function exit code */
10162   __pyx_L1_error:;
10163   __Pyx_XDECREF(__pyx_t_1);
10164   __Pyx_XDECREF(__pyx_t_2);
10165   __Pyx_AddTraceback("lxml.objectify.NumberElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10166   __pyx_r = NULL;
10167   __pyx_L0:;
10168   __Pyx_XGIVEREF(__pyx_r);
10169   __Pyx_RefNannyFinishContext();
10170   return __pyx_r;
10171 }
10172
10173 /* "lxml/objectify.pyx":640
10174  *         return unicode(_parseNumber(self))
10175  * 
10176  *     def __repr__(self):             # <<<<<<<<<<<<<<
10177  *         return repr(_parseNumber(self))
10178  * 
10179  */
10180
10181 /* Python wrapper */
10182 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_13__repr__(PyObject *__pyx_v_self); /*proto*/
10183 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_13__repr__(PyObject *__pyx_v_self) {
10184   PyObject *__pyx_r = 0;
10185   __Pyx_RefNannyDeclarations
10186   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10187   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_12__repr__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10188
10189   /* function exit code */
10190   __Pyx_RefNannyFinishContext();
10191   return __pyx_r;
10192 }
10193
10194 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_12__repr__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10195   PyObject *__pyx_r = NULL;
10196   __Pyx_RefNannyDeclarations
10197   PyObject *__pyx_t_1 = NULL;
10198   PyObject *__pyx_t_2 = NULL;
10199   int __pyx_lineno = 0;
10200   const char *__pyx_filename = NULL;
10201   int __pyx_clineno = 0;
10202   __Pyx_RefNannySetupContext("__repr__", 0);
10203
10204   /* "lxml/objectify.pyx":641
10205  * 
10206  *     def __repr__(self):
10207  *         return repr(_parseNumber(self))             # <<<<<<<<<<<<<<
10208  * 
10209  *     def __oct__(self):
10210  */
10211   __Pyx_XDECREF(__pyx_r);
10212   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
10213   __Pyx_GOTREF(__pyx_t_1);
10214   __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
10215   __Pyx_GOTREF(__pyx_t_2);
10216   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10217   __pyx_r = __pyx_t_2;
10218   __pyx_t_2 = 0;
10219   goto __pyx_L0;
10220
10221   /* "lxml/objectify.pyx":640
10222  *         return unicode(_parseNumber(self))
10223  * 
10224  *     def __repr__(self):             # <<<<<<<<<<<<<<
10225  *         return repr(_parseNumber(self))
10226  * 
10227  */
10228
10229   /* function exit code */
10230   __pyx_L1_error:;
10231   __Pyx_XDECREF(__pyx_t_1);
10232   __Pyx_XDECREF(__pyx_t_2);
10233   __Pyx_AddTraceback("lxml.objectify.NumberElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10234   __pyx_r = NULL;
10235   __pyx_L0:;
10236   __Pyx_XGIVEREF(__pyx_r);
10237   __Pyx_RefNannyFinishContext();
10238   return __pyx_r;
10239 }
10240
10241 /* "lxml/objectify.pyx":643
10242  *         return repr(_parseNumber(self))
10243  * 
10244  *     def __oct__(self):             # <<<<<<<<<<<<<<
10245  *         return oct(_parseNumber(self))
10246  * 
10247  */
10248
10249 /* Python wrapper */
10250 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10251 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_15__oct__(PyObject *__pyx_v_self); /*proto*/
10252 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_15__oct__(PyObject *__pyx_v_self) {
10253   PyObject *__pyx_r = 0;
10254   __Pyx_RefNannyDeclarations
10255   __Pyx_RefNannySetupContext("__oct__ (wrapper)", 0);
10256   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_14__oct__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10257
10258   /* function exit code */
10259   __Pyx_RefNannyFinishContext();
10260   return __pyx_r;
10261 }
10262 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10263
10264 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10265 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_14__oct__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10266   PyObject *__pyx_r = NULL;
10267   __Pyx_RefNannyDeclarations
10268   PyObject *__pyx_t_1 = NULL;
10269   PyObject *__pyx_t_2 = NULL;
10270   int __pyx_lineno = 0;
10271   const char *__pyx_filename = NULL;
10272   int __pyx_clineno = 0;
10273   __Pyx_RefNannySetupContext("__oct__", 0);
10274
10275   /* "lxml/objectify.pyx":644
10276  * 
10277  *     def __oct__(self):
10278  *         return oct(_parseNumber(self))             # <<<<<<<<<<<<<<
10279  * 
10280  *     def __hex__(self):
10281  */
10282   __Pyx_XDECREF(__pyx_r);
10283   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
10284   __Pyx_GOTREF(__pyx_t_1);
10285   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_oct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
10286   __Pyx_GOTREF(__pyx_t_2);
10287   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10288   __pyx_r = __pyx_t_2;
10289   __pyx_t_2 = 0;
10290   goto __pyx_L0;
10291
10292   /* "lxml/objectify.pyx":643
10293  *         return repr(_parseNumber(self))
10294  * 
10295  *     def __oct__(self):             # <<<<<<<<<<<<<<
10296  *         return oct(_parseNumber(self))
10297  * 
10298  */
10299
10300   /* function exit code */
10301   __pyx_L1_error:;
10302   __Pyx_XDECREF(__pyx_t_1);
10303   __Pyx_XDECREF(__pyx_t_2);
10304   __Pyx_AddTraceback("lxml.objectify.NumberElement.__oct__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10305   __pyx_r = NULL;
10306   __pyx_L0:;
10307   __Pyx_XGIVEREF(__pyx_r);
10308   __Pyx_RefNannyFinishContext();
10309   return __pyx_r;
10310 }
10311 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10312
10313 /* "lxml/objectify.pyx":646
10314  *         return oct(_parseNumber(self))
10315  * 
10316  *     def __hex__(self):             # <<<<<<<<<<<<<<
10317  *         return hex(_parseNumber(self))
10318  * 
10319  */
10320
10321 /* Python wrapper */
10322 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10323 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_17__hex__(PyObject *__pyx_v_self); /*proto*/
10324 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_17__hex__(PyObject *__pyx_v_self) {
10325   PyObject *__pyx_r = 0;
10326   __Pyx_RefNannyDeclarations
10327   __Pyx_RefNannySetupContext("__hex__ (wrapper)", 0);
10328   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_16__hex__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10329
10330   /* function exit code */
10331   __Pyx_RefNannyFinishContext();
10332   return __pyx_r;
10333 }
10334 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10335
10336 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10337 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_16__hex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10338   PyObject *__pyx_r = NULL;
10339   __Pyx_RefNannyDeclarations
10340   PyObject *__pyx_t_1 = NULL;
10341   PyObject *__pyx_t_2 = NULL;
10342   int __pyx_lineno = 0;
10343   const char *__pyx_filename = NULL;
10344   int __pyx_clineno = 0;
10345   __Pyx_RefNannySetupContext("__hex__", 0);
10346
10347   /* "lxml/objectify.pyx":647
10348  * 
10349  *     def __hex__(self):
10350  *         return hex(_parseNumber(self))             # <<<<<<<<<<<<<<
10351  * 
10352  *     def __richcmp__(self, other, int op):
10353  */
10354   __Pyx_XDECREF(__pyx_r);
10355   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
10356   __Pyx_GOTREF(__pyx_t_1);
10357   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
10358   __Pyx_GOTREF(__pyx_t_2);
10359   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10360   __pyx_r = __pyx_t_2;
10361   __pyx_t_2 = 0;
10362   goto __pyx_L0;
10363
10364   /* "lxml/objectify.pyx":646
10365  *         return oct(_parseNumber(self))
10366  * 
10367  *     def __hex__(self):             # <<<<<<<<<<<<<<
10368  *         return hex(_parseNumber(self))
10369  * 
10370  */
10371
10372   /* function exit code */
10373   __pyx_L1_error:;
10374   __Pyx_XDECREF(__pyx_t_1);
10375   __Pyx_XDECREF(__pyx_t_2);
10376   __Pyx_AddTraceback("lxml.objectify.NumberElement.__hex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10377   __pyx_r = NULL;
10378   __pyx_L0:;
10379   __Pyx_XGIVEREF(__pyx_r);
10380   __Pyx_RefNannyFinishContext();
10381   return __pyx_r;
10382 }
10383 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10384
10385 /* "lxml/objectify.pyx":649
10386  *         return hex(_parseNumber(self))
10387  * 
10388  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
10389  *         return _richcmpPyvals(self, other, op)
10390  * 
10391  */
10392
10393 /* Python wrapper */
10394 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_19__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
10395 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_19__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
10396   PyObject *__pyx_r = 0;
10397   __Pyx_RefNannyDeclarations
10398   __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
10399   __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));
10400
10401   /* function exit code */
10402   __Pyx_RefNannyFinishContext();
10403   return __pyx_r;
10404 }
10405
10406 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) {
10407   PyObject *__pyx_r = NULL;
10408   __Pyx_RefNannyDeclarations
10409   PyObject *__pyx_t_1 = NULL;
10410   int __pyx_lineno = 0;
10411   const char *__pyx_filename = NULL;
10412   int __pyx_clineno = 0;
10413   __Pyx_RefNannySetupContext("__richcmp__", 0);
10414
10415   /* "lxml/objectify.pyx":650
10416  * 
10417  *     def __richcmp__(self, other, int op):
10418  *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
10419  * 
10420  *     def __hash__(self):
10421  */
10422   __Pyx_XDECREF(__pyx_r);
10423   __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)
10424   __Pyx_GOTREF(__pyx_t_1);
10425   __pyx_r = __pyx_t_1;
10426   __pyx_t_1 = 0;
10427   goto __pyx_L0;
10428
10429   /* "lxml/objectify.pyx":649
10430  *         return hex(_parseNumber(self))
10431  * 
10432  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
10433  *         return _richcmpPyvals(self, other, op)
10434  * 
10435  */
10436
10437   /* function exit code */
10438   __pyx_L1_error:;
10439   __Pyx_XDECREF(__pyx_t_1);
10440   __Pyx_AddTraceback("lxml.objectify.NumberElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10441   __pyx_r = NULL;
10442   __pyx_L0:;
10443   __Pyx_XGIVEREF(__pyx_r);
10444   __Pyx_RefNannyFinishContext();
10445   return __pyx_r;
10446 }
10447
10448 /* "lxml/objectify.pyx":652
10449  *         return _richcmpPyvals(self, other, op)
10450  * 
10451  *     def __hash__(self):             # <<<<<<<<<<<<<<
10452  *         return hash(_parseNumber(self))
10453  * 
10454  */
10455
10456 /* Python wrapper */
10457 static Py_hash_t __pyx_pw_4lxml_9objectify_13NumberElement_21__hash__(PyObject *__pyx_v_self); /*proto*/
10458 static Py_hash_t __pyx_pw_4lxml_9objectify_13NumberElement_21__hash__(PyObject *__pyx_v_self) {
10459   Py_hash_t __pyx_r;
10460   __Pyx_RefNannyDeclarations
10461   __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
10462   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_20__hash__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10463
10464   /* function exit code */
10465   __Pyx_RefNannyFinishContext();
10466   return __pyx_r;
10467 }
10468
10469 static Py_hash_t __pyx_pf_4lxml_9objectify_13NumberElement_20__hash__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10470   Py_hash_t __pyx_r;
10471   __Pyx_RefNannyDeclarations
10472   PyObject *__pyx_t_1 = NULL;
10473   Py_hash_t __pyx_t_2;
10474   int __pyx_lineno = 0;
10475   const char *__pyx_filename = NULL;
10476   int __pyx_clineno = 0;
10477   __Pyx_RefNannySetupContext("__hash__", 0);
10478
10479   /* "lxml/objectify.pyx":653
10480  * 
10481  *     def __hash__(self):
10482  *         return hash(_parseNumber(self))             # <<<<<<<<<<<<<<
10483  * 
10484  *     def __add__(self, other):
10485  */
10486   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
10487   __Pyx_GOTREF(__pyx_t_1);
10488   __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 653, __pyx_L1_error)
10489   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10490   __pyx_r = __pyx_t_2;
10491   goto __pyx_L0;
10492
10493   /* "lxml/objectify.pyx":652
10494  *         return _richcmpPyvals(self, other, op)
10495  * 
10496  *     def __hash__(self):             # <<<<<<<<<<<<<<
10497  *         return hash(_parseNumber(self))
10498  * 
10499  */
10500
10501   /* function exit code */
10502   __pyx_L1_error:;
10503   __Pyx_XDECREF(__pyx_t_1);
10504   __Pyx_AddTraceback("lxml.objectify.NumberElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10505   __pyx_r = -1;
10506   __pyx_L0:;
10507   if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
10508   __Pyx_RefNannyFinishContext();
10509   return __pyx_r;
10510 }
10511
10512 /* "lxml/objectify.pyx":655
10513  *         return hash(_parseNumber(self))
10514  * 
10515  *     def __add__(self, other):             # <<<<<<<<<<<<<<
10516  *         return _numericValueOf(self) + _numericValueOf(other)
10517  * 
10518  */
10519
10520 /* Python wrapper */
10521 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_23__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10522 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_23__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10523   PyObject *__pyx_r = 0;
10524   __Pyx_RefNannyDeclarations
10525   __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
10526   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_22__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10527
10528   /* function exit code */
10529   __Pyx_RefNannyFinishContext();
10530   return __pyx_r;
10531 }
10532
10533 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_22__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10534   PyObject *__pyx_r = NULL;
10535   __Pyx_RefNannyDeclarations
10536   PyObject *__pyx_t_1 = NULL;
10537   PyObject *__pyx_t_2 = NULL;
10538   PyObject *__pyx_t_3 = NULL;
10539   int __pyx_lineno = 0;
10540   const char *__pyx_filename = NULL;
10541   int __pyx_clineno = 0;
10542   __Pyx_RefNannySetupContext("__add__", 0);
10543
10544   /* "lxml/objectify.pyx":656
10545  * 
10546  *     def __add__(self, other):
10547  *         return _numericValueOf(self) + _numericValueOf(other)             # <<<<<<<<<<<<<<
10548  * 
10549  *     def __sub__(self, other):
10550  */
10551   __Pyx_XDECREF(__pyx_r);
10552   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)
10553   __Pyx_GOTREF(__pyx_t_1);
10554   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
10555   __Pyx_GOTREF(__pyx_t_2);
10556   __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error)
10557   __Pyx_GOTREF(__pyx_t_3);
10558   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10559   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10560   __pyx_r = __pyx_t_3;
10561   __pyx_t_3 = 0;
10562   goto __pyx_L0;
10563
10564   /* "lxml/objectify.pyx":655
10565  *         return hash(_parseNumber(self))
10566  * 
10567  *     def __add__(self, other):             # <<<<<<<<<<<<<<
10568  *         return _numericValueOf(self) + _numericValueOf(other)
10569  * 
10570  */
10571
10572   /* function exit code */
10573   __pyx_L1_error:;
10574   __Pyx_XDECREF(__pyx_t_1);
10575   __Pyx_XDECREF(__pyx_t_2);
10576   __Pyx_XDECREF(__pyx_t_3);
10577   __Pyx_AddTraceback("lxml.objectify.NumberElement.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10578   __pyx_r = NULL;
10579   __pyx_L0:;
10580   __Pyx_XGIVEREF(__pyx_r);
10581   __Pyx_RefNannyFinishContext();
10582   return __pyx_r;
10583 }
10584
10585 /* "lxml/objectify.pyx":658
10586  *         return _numericValueOf(self) + _numericValueOf(other)
10587  * 
10588  *     def __sub__(self, other):             # <<<<<<<<<<<<<<
10589  *         return _numericValueOf(self) - _numericValueOf(other)
10590  * 
10591  */
10592
10593 /* Python wrapper */
10594 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_25__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10595 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_25__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10596   PyObject *__pyx_r = 0;
10597   __Pyx_RefNannyDeclarations
10598   __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
10599   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_24__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10600
10601   /* function exit code */
10602   __Pyx_RefNannyFinishContext();
10603   return __pyx_r;
10604 }
10605
10606 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_24__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10607   PyObject *__pyx_r = NULL;
10608   __Pyx_RefNannyDeclarations
10609   PyObject *__pyx_t_1 = NULL;
10610   PyObject *__pyx_t_2 = NULL;
10611   PyObject *__pyx_t_3 = NULL;
10612   int __pyx_lineno = 0;
10613   const char *__pyx_filename = NULL;
10614   int __pyx_clineno = 0;
10615   __Pyx_RefNannySetupContext("__sub__", 0);
10616
10617   /* "lxml/objectify.pyx":659
10618  * 
10619  *     def __sub__(self, other):
10620  *         return _numericValueOf(self) - _numericValueOf(other)             # <<<<<<<<<<<<<<
10621  * 
10622  *     def __mul__(self, other):
10623  */
10624   __Pyx_XDECREF(__pyx_r);
10625   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
10626   __Pyx_GOTREF(__pyx_t_1);
10627   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
10628   __Pyx_GOTREF(__pyx_t_2);
10629   __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error)
10630   __Pyx_GOTREF(__pyx_t_3);
10631   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10632   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10633   __pyx_r = __pyx_t_3;
10634   __pyx_t_3 = 0;
10635   goto __pyx_L0;
10636
10637   /* "lxml/objectify.pyx":658
10638  *         return _numericValueOf(self) + _numericValueOf(other)
10639  * 
10640  *     def __sub__(self, other):             # <<<<<<<<<<<<<<
10641  *         return _numericValueOf(self) - _numericValueOf(other)
10642  * 
10643  */
10644
10645   /* function exit code */
10646   __pyx_L1_error:;
10647   __Pyx_XDECREF(__pyx_t_1);
10648   __Pyx_XDECREF(__pyx_t_2);
10649   __Pyx_XDECREF(__pyx_t_3);
10650   __Pyx_AddTraceback("lxml.objectify.NumberElement.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10651   __pyx_r = NULL;
10652   __pyx_L0:;
10653   __Pyx_XGIVEREF(__pyx_r);
10654   __Pyx_RefNannyFinishContext();
10655   return __pyx_r;
10656 }
10657
10658 /* "lxml/objectify.pyx":661
10659  *         return _numericValueOf(self) - _numericValueOf(other)
10660  * 
10661  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
10662  *         return _numericValueOf(self) * _numericValueOf(other)
10663  * 
10664  */
10665
10666 /* Python wrapper */
10667 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_27__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10668 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_27__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10669   PyObject *__pyx_r = 0;
10670   __Pyx_RefNannyDeclarations
10671   __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
10672   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_26__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10673
10674   /* function exit code */
10675   __Pyx_RefNannyFinishContext();
10676   return __pyx_r;
10677 }
10678
10679 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_26__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10680   PyObject *__pyx_r = NULL;
10681   __Pyx_RefNannyDeclarations
10682   PyObject *__pyx_t_1 = NULL;
10683   PyObject *__pyx_t_2 = NULL;
10684   PyObject *__pyx_t_3 = NULL;
10685   int __pyx_lineno = 0;
10686   const char *__pyx_filename = NULL;
10687   int __pyx_clineno = 0;
10688   __Pyx_RefNannySetupContext("__mul__", 0);
10689
10690   /* "lxml/objectify.pyx":662
10691  * 
10692  *     def __mul__(self, other):
10693  *         return _numericValueOf(self) * _numericValueOf(other)             # <<<<<<<<<<<<<<
10694  * 
10695  *     def __div__(self, other):
10696  */
10697   __Pyx_XDECREF(__pyx_r);
10698   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
10699   __Pyx_GOTREF(__pyx_t_1);
10700   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
10701   __Pyx_GOTREF(__pyx_t_2);
10702   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error)
10703   __Pyx_GOTREF(__pyx_t_3);
10704   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10705   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10706   __pyx_r = __pyx_t_3;
10707   __pyx_t_3 = 0;
10708   goto __pyx_L0;
10709
10710   /* "lxml/objectify.pyx":661
10711  *         return _numericValueOf(self) - _numericValueOf(other)
10712  * 
10713  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
10714  *         return _numericValueOf(self) * _numericValueOf(other)
10715  * 
10716  */
10717
10718   /* function exit code */
10719   __pyx_L1_error:;
10720   __Pyx_XDECREF(__pyx_t_1);
10721   __Pyx_XDECREF(__pyx_t_2);
10722   __Pyx_XDECREF(__pyx_t_3);
10723   __Pyx_AddTraceback("lxml.objectify.NumberElement.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10724   __pyx_r = NULL;
10725   __pyx_L0:;
10726   __Pyx_XGIVEREF(__pyx_r);
10727   __Pyx_RefNannyFinishContext();
10728   return __pyx_r;
10729 }
10730
10731 /* "lxml/objectify.pyx":664
10732  *         return _numericValueOf(self) * _numericValueOf(other)
10733  * 
10734  *     def __div__(self, other):             # <<<<<<<<<<<<<<
10735  *         return _numericValueOf(self) / _numericValueOf(other)
10736  * 
10737  */
10738
10739 /* Python wrapper */
10740 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10741 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_29__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10742 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_29__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10743   PyObject *__pyx_r = 0;
10744   __Pyx_RefNannyDeclarations
10745   __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
10746   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_28__div__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10747
10748   /* function exit code */
10749   __Pyx_RefNannyFinishContext();
10750   return __pyx_r;
10751 }
10752 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10753
10754 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10755 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_28__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10756   PyObject *__pyx_r = NULL;
10757   __Pyx_RefNannyDeclarations
10758   PyObject *__pyx_t_1 = NULL;
10759   PyObject *__pyx_t_2 = NULL;
10760   PyObject *__pyx_t_3 = NULL;
10761   int __pyx_lineno = 0;
10762   const char *__pyx_filename = NULL;
10763   int __pyx_clineno = 0;
10764   __Pyx_RefNannySetupContext("__div__", 0);
10765
10766   /* "lxml/objectify.pyx":665
10767  * 
10768  *     def __div__(self, other):
10769  *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<<
10770  * 
10771  *     def __truediv__(self, other):
10772  */
10773   __Pyx_XDECREF(__pyx_r);
10774   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
10775   __Pyx_GOTREF(__pyx_t_1);
10776   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
10777   __Pyx_GOTREF(__pyx_t_2);
10778   __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 665, __pyx_L1_error)
10779   __Pyx_GOTREF(__pyx_t_3);
10780   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10781   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10782   __pyx_r = __pyx_t_3;
10783   __pyx_t_3 = 0;
10784   goto __pyx_L0;
10785
10786   /* "lxml/objectify.pyx":664
10787  *         return _numericValueOf(self) * _numericValueOf(other)
10788  * 
10789  *     def __div__(self, other):             # <<<<<<<<<<<<<<
10790  *         return _numericValueOf(self) / _numericValueOf(other)
10791  * 
10792  */
10793
10794   /* function exit code */
10795   __pyx_L1_error:;
10796   __Pyx_XDECREF(__pyx_t_1);
10797   __Pyx_XDECREF(__pyx_t_2);
10798   __Pyx_XDECREF(__pyx_t_3);
10799   __Pyx_AddTraceback("lxml.objectify.NumberElement.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10800   __pyx_r = NULL;
10801   __pyx_L0:;
10802   __Pyx_XGIVEREF(__pyx_r);
10803   __Pyx_RefNannyFinishContext();
10804   return __pyx_r;
10805 }
10806 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10807
10808 /* "lxml/objectify.pyx":667
10809  *         return _numericValueOf(self) / _numericValueOf(other)
10810  * 
10811  *     def __truediv__(self, other):             # <<<<<<<<<<<<<<
10812  *         return _numericValueOf(self) / _numericValueOf(other)
10813  * 
10814  */
10815
10816 /* Python wrapper */
10817 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10818 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10819   PyObject *__pyx_r = 0;
10820   __Pyx_RefNannyDeclarations
10821   __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
10822   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_30__truediv__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10823
10824   /* function exit code */
10825   __Pyx_RefNannyFinishContext();
10826   return __pyx_r;
10827 }
10828
10829 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_30__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10830   PyObject *__pyx_r = NULL;
10831   __Pyx_RefNannyDeclarations
10832   PyObject *__pyx_t_1 = NULL;
10833   PyObject *__pyx_t_2 = NULL;
10834   PyObject *__pyx_t_3 = NULL;
10835   int __pyx_lineno = 0;
10836   const char *__pyx_filename = NULL;
10837   int __pyx_clineno = 0;
10838   __Pyx_RefNannySetupContext("__truediv__", 0);
10839
10840   /* "lxml/objectify.pyx":668
10841  * 
10842  *     def __truediv__(self, other):
10843  *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<<
10844  * 
10845  *     def __mod__(self, other):
10846  */
10847   __Pyx_XDECREF(__pyx_r);
10848   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
10849   __Pyx_GOTREF(__pyx_t_1);
10850   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
10851   __Pyx_GOTREF(__pyx_t_2);
10852   __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
10853   __Pyx_GOTREF(__pyx_t_3);
10854   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10855   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10856   __pyx_r = __pyx_t_3;
10857   __pyx_t_3 = 0;
10858   goto __pyx_L0;
10859
10860   /* "lxml/objectify.pyx":667
10861  *         return _numericValueOf(self) / _numericValueOf(other)
10862  * 
10863  *     def __truediv__(self, other):             # <<<<<<<<<<<<<<
10864  *         return _numericValueOf(self) / _numericValueOf(other)
10865  * 
10866  */
10867
10868   /* function exit code */
10869   __pyx_L1_error:;
10870   __Pyx_XDECREF(__pyx_t_1);
10871   __Pyx_XDECREF(__pyx_t_2);
10872   __Pyx_XDECREF(__pyx_t_3);
10873   __Pyx_AddTraceback("lxml.objectify.NumberElement.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10874   __pyx_r = NULL;
10875   __pyx_L0:;
10876   __Pyx_XGIVEREF(__pyx_r);
10877   __Pyx_RefNannyFinishContext();
10878   return __pyx_r;
10879 }
10880
10881 /* "lxml/objectify.pyx":670
10882  *         return _numericValueOf(self) / _numericValueOf(other)
10883  * 
10884  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
10885  *         return _numericValueOf(self) % _numericValueOf(other)
10886  * 
10887  */
10888
10889 /* Python wrapper */
10890 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_33__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10891 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_33__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10892   PyObject *__pyx_r = 0;
10893   __Pyx_RefNannyDeclarations
10894   __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
10895   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_32__mod__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10896
10897   /* function exit code */
10898   __Pyx_RefNannyFinishContext();
10899   return __pyx_r;
10900 }
10901
10902 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_32__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10903   PyObject *__pyx_r = NULL;
10904   __Pyx_RefNannyDeclarations
10905   PyObject *__pyx_t_1 = NULL;
10906   PyObject *__pyx_t_2 = NULL;
10907   PyObject *__pyx_t_3 = NULL;
10908   int __pyx_lineno = 0;
10909   const char *__pyx_filename = NULL;
10910   int __pyx_clineno = 0;
10911   __Pyx_RefNannySetupContext("__mod__", 0);
10912
10913   /* "lxml/objectify.pyx":671
10914  * 
10915  *     def __mod__(self, other):
10916  *         return _numericValueOf(self) % _numericValueOf(other)             # <<<<<<<<<<<<<<
10917  * 
10918  *     def __pow__(self, other, modulo):
10919  */
10920   __Pyx_XDECREF(__pyx_r);
10921   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
10922   __Pyx_GOTREF(__pyx_t_1);
10923   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error)
10924   __Pyx_GOTREF(__pyx_t_2);
10925   __pyx_t_3 = PyNumber_Remainder(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 671, __pyx_L1_error)
10926   __Pyx_GOTREF(__pyx_t_3);
10927   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10928   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10929   __pyx_r = __pyx_t_3;
10930   __pyx_t_3 = 0;
10931   goto __pyx_L0;
10932
10933   /* "lxml/objectify.pyx":670
10934  *         return _numericValueOf(self) / _numericValueOf(other)
10935  * 
10936  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
10937  *         return _numericValueOf(self) % _numericValueOf(other)
10938  * 
10939  */
10940
10941   /* function exit code */
10942   __pyx_L1_error:;
10943   __Pyx_XDECREF(__pyx_t_1);
10944   __Pyx_XDECREF(__pyx_t_2);
10945   __Pyx_XDECREF(__pyx_t_3);
10946   __Pyx_AddTraceback("lxml.objectify.NumberElement.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10947   __pyx_r = NULL;
10948   __pyx_L0:;
10949   __Pyx_XGIVEREF(__pyx_r);
10950   __Pyx_RefNannyFinishContext();
10951   return __pyx_r;
10952 }
10953
10954 /* "lxml/objectify.pyx":673
10955  *         return _numericValueOf(self) % _numericValueOf(other)
10956  * 
10957  *     def __pow__(self, other, modulo):             # <<<<<<<<<<<<<<
10958  *         if modulo is None:
10959  *             return _numericValueOf(self) ** _numericValueOf(other)
10960  */
10961
10962 /* Python wrapper */
10963 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_35__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/
10964 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_35__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
10965   PyObject *__pyx_r = 0;
10966   __Pyx_RefNannyDeclarations
10967   __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
10968   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_34__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_modulo));
10969
10970   /* function exit code */
10971   __Pyx_RefNannyFinishContext();
10972   return __pyx_r;
10973 }
10974
10975 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_34__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
10976   PyObject *__pyx_r = NULL;
10977   __Pyx_RefNannyDeclarations
10978   int __pyx_t_1;
10979   int __pyx_t_2;
10980   PyObject *__pyx_t_3 = NULL;
10981   PyObject *__pyx_t_4 = NULL;
10982   PyObject *__pyx_t_5 = NULL;
10983   int __pyx_lineno = 0;
10984   const char *__pyx_filename = NULL;
10985   int __pyx_clineno = 0;
10986   __Pyx_RefNannySetupContext("__pow__", 0);
10987
10988   /* "lxml/objectify.pyx":674
10989  * 
10990  *     def __pow__(self, other, modulo):
10991  *         if modulo is None:             # <<<<<<<<<<<<<<
10992  *             return _numericValueOf(self) ** _numericValueOf(other)
10993  *         else:
10994  */
10995   __pyx_t_1 = (__pyx_v_modulo == Py_None);
10996   __pyx_t_2 = (__pyx_t_1 != 0);
10997   if (__pyx_t_2) {
10998
10999     /* "lxml/objectify.pyx":675
11000  *     def __pow__(self, other, modulo):
11001  *         if modulo is None:
11002  *             return _numericValueOf(self) ** _numericValueOf(other)             # <<<<<<<<<<<<<<
11003  *         else:
11004  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
11005  */
11006     __Pyx_XDECREF(__pyx_r);
11007     __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 675, __pyx_L1_error)
11008     __Pyx_GOTREF(__pyx_t_3);
11009     __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 675, __pyx_L1_error)
11010     __Pyx_GOTREF(__pyx_t_4);
11011     __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)
11012     __Pyx_GOTREF(__pyx_t_5);
11013     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11014     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11015     __pyx_r = __pyx_t_5;
11016     __pyx_t_5 = 0;
11017     goto __pyx_L0;
11018
11019     /* "lxml/objectify.pyx":674
11020  * 
11021  *     def __pow__(self, other, modulo):
11022  *         if modulo is None:             # <<<<<<<<<<<<<<
11023  *             return _numericValueOf(self) ** _numericValueOf(other)
11024  *         else:
11025  */
11026   }
11027
11028   /* "lxml/objectify.pyx":677
11029  *             return _numericValueOf(self) ** _numericValueOf(other)
11030  *         else:
11031  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)             # <<<<<<<<<<<<<<
11032  * 
11033  *     def __neg__(self):
11034  */
11035   /*else*/ {
11036     __Pyx_XDECREF(__pyx_r);
11037     __pyx_t_5 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error)
11038     __Pyx_GOTREF(__pyx_t_5);
11039     __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error)
11040     __Pyx_GOTREF(__pyx_t_4);
11041     __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)
11042     __Pyx_GOTREF(__pyx_t_3);
11043     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11044     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11045     __pyx_r = __pyx_t_3;
11046     __pyx_t_3 = 0;
11047     goto __pyx_L0;
11048   }
11049
11050   /* "lxml/objectify.pyx":673
11051  *         return _numericValueOf(self) % _numericValueOf(other)
11052  * 
11053  *     def __pow__(self, other, modulo):             # <<<<<<<<<<<<<<
11054  *         if modulo is None:
11055  *             return _numericValueOf(self) ** _numericValueOf(other)
11056  */
11057
11058   /* function exit code */
11059   __pyx_L1_error:;
11060   __Pyx_XDECREF(__pyx_t_3);
11061   __Pyx_XDECREF(__pyx_t_4);
11062   __Pyx_XDECREF(__pyx_t_5);
11063   __Pyx_AddTraceback("lxml.objectify.NumberElement.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11064   __pyx_r = NULL;
11065   __pyx_L0:;
11066   __Pyx_XGIVEREF(__pyx_r);
11067   __Pyx_RefNannyFinishContext();
11068   return __pyx_r;
11069 }
11070
11071 /* "lxml/objectify.pyx":679
11072  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
11073  * 
11074  *     def __neg__(self):             # <<<<<<<<<<<<<<
11075  *         return - _numericValueOf(self)
11076  * 
11077  */
11078
11079 /* Python wrapper */
11080 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_37__neg__(PyObject *__pyx_v_self); /*proto*/
11081 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_37__neg__(PyObject *__pyx_v_self) {
11082   PyObject *__pyx_r = 0;
11083   __Pyx_RefNannyDeclarations
11084   __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
11085   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_36__neg__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11086
11087   /* function exit code */
11088   __Pyx_RefNannyFinishContext();
11089   return __pyx_r;
11090 }
11091
11092 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_36__neg__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11093   PyObject *__pyx_r = NULL;
11094   __Pyx_RefNannyDeclarations
11095   PyObject *__pyx_t_1 = NULL;
11096   PyObject *__pyx_t_2 = NULL;
11097   int __pyx_lineno = 0;
11098   const char *__pyx_filename = NULL;
11099   int __pyx_clineno = 0;
11100   __Pyx_RefNannySetupContext("__neg__", 0);
11101
11102   /* "lxml/objectify.pyx":680
11103  * 
11104  *     def __neg__(self):
11105  *         return - _numericValueOf(self)             # <<<<<<<<<<<<<<
11106  * 
11107  *     def __pos__(self):
11108  */
11109   __Pyx_XDECREF(__pyx_r);
11110   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
11111   __Pyx_GOTREF(__pyx_t_1);
11112   __pyx_t_2 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
11113   __Pyx_GOTREF(__pyx_t_2);
11114   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11115   __pyx_r = __pyx_t_2;
11116   __pyx_t_2 = 0;
11117   goto __pyx_L0;
11118
11119   /* "lxml/objectify.pyx":679
11120  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
11121  * 
11122  *     def __neg__(self):             # <<<<<<<<<<<<<<
11123  *         return - _numericValueOf(self)
11124  * 
11125  */
11126
11127   /* function exit code */
11128   __pyx_L1_error:;
11129   __Pyx_XDECREF(__pyx_t_1);
11130   __Pyx_XDECREF(__pyx_t_2);
11131   __Pyx_AddTraceback("lxml.objectify.NumberElement.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11132   __pyx_r = NULL;
11133   __pyx_L0:;
11134   __Pyx_XGIVEREF(__pyx_r);
11135   __Pyx_RefNannyFinishContext();
11136   return __pyx_r;
11137 }
11138
11139 /* "lxml/objectify.pyx":682
11140  *         return - _numericValueOf(self)
11141  * 
11142  *     def __pos__(self):             # <<<<<<<<<<<<<<
11143  *         return + _numericValueOf(self)
11144  * 
11145  */
11146
11147 /* Python wrapper */
11148 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_39__pos__(PyObject *__pyx_v_self); /*proto*/
11149 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_39__pos__(PyObject *__pyx_v_self) {
11150   PyObject *__pyx_r = 0;
11151   __Pyx_RefNannyDeclarations
11152   __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
11153   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_38__pos__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11154
11155   /* function exit code */
11156   __Pyx_RefNannyFinishContext();
11157   return __pyx_r;
11158 }
11159
11160 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_38__pos__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11161   PyObject *__pyx_r = NULL;
11162   __Pyx_RefNannyDeclarations
11163   PyObject *__pyx_t_1 = NULL;
11164   PyObject *__pyx_t_2 = NULL;
11165   int __pyx_lineno = 0;
11166   const char *__pyx_filename = NULL;
11167   int __pyx_clineno = 0;
11168   __Pyx_RefNannySetupContext("__pos__", 0);
11169
11170   /* "lxml/objectify.pyx":683
11171  * 
11172  *     def __pos__(self):
11173  *         return + _numericValueOf(self)             # <<<<<<<<<<<<<<
11174  * 
11175  *     def __abs__(self):
11176  */
11177   __Pyx_XDECREF(__pyx_r);
11178   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
11179   __Pyx_GOTREF(__pyx_t_1);
11180   __pyx_t_2 = PyNumber_Positive(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error)
11181   __Pyx_GOTREF(__pyx_t_2);
11182   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11183   __pyx_r = __pyx_t_2;
11184   __pyx_t_2 = 0;
11185   goto __pyx_L0;
11186
11187   /* "lxml/objectify.pyx":682
11188  *         return - _numericValueOf(self)
11189  * 
11190  *     def __pos__(self):             # <<<<<<<<<<<<<<
11191  *         return + _numericValueOf(self)
11192  * 
11193  */
11194
11195   /* function exit code */
11196   __pyx_L1_error:;
11197   __Pyx_XDECREF(__pyx_t_1);
11198   __Pyx_XDECREF(__pyx_t_2);
11199   __Pyx_AddTraceback("lxml.objectify.NumberElement.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11200   __pyx_r = NULL;
11201   __pyx_L0:;
11202   __Pyx_XGIVEREF(__pyx_r);
11203   __Pyx_RefNannyFinishContext();
11204   return __pyx_r;
11205 }
11206
11207 /* "lxml/objectify.pyx":685
11208  *         return + _numericValueOf(self)
11209  * 
11210  *     def __abs__(self):             # <<<<<<<<<<<<<<
11211  *         return abs( _numericValueOf(self) )
11212  * 
11213  */
11214
11215 /* Python wrapper */
11216 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_41__abs__(PyObject *__pyx_v_self); /*proto*/
11217 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_41__abs__(PyObject *__pyx_v_self) {
11218   PyObject *__pyx_r = 0;
11219   __Pyx_RefNannyDeclarations
11220   __Pyx_RefNannySetupContext("__abs__ (wrapper)", 0);
11221   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_40__abs__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11222
11223   /* function exit code */
11224   __Pyx_RefNannyFinishContext();
11225   return __pyx_r;
11226 }
11227
11228 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_40__abs__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11229   PyObject *__pyx_r = NULL;
11230   __Pyx_RefNannyDeclarations
11231   PyObject *__pyx_t_1 = NULL;
11232   PyObject *__pyx_t_2 = NULL;
11233   int __pyx_lineno = 0;
11234   const char *__pyx_filename = NULL;
11235   int __pyx_clineno = 0;
11236   __Pyx_RefNannySetupContext("__abs__", 0);
11237
11238   /* "lxml/objectify.pyx":686
11239  * 
11240  *     def __abs__(self):
11241  *         return abs( _numericValueOf(self) )             # <<<<<<<<<<<<<<
11242  * 
11243  *     def __nonzero__(self):
11244  */
11245   __Pyx_XDECREF(__pyx_r);
11246   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
11247   __Pyx_GOTREF(__pyx_t_1);
11248   __pyx_t_2 = __Pyx_PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
11249   __Pyx_GOTREF(__pyx_t_2);
11250   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11251   __pyx_r = __pyx_t_2;
11252   __pyx_t_2 = 0;
11253   goto __pyx_L0;
11254
11255   /* "lxml/objectify.pyx":685
11256  *         return + _numericValueOf(self)
11257  * 
11258  *     def __abs__(self):             # <<<<<<<<<<<<<<
11259  *         return abs( _numericValueOf(self) )
11260  * 
11261  */
11262
11263   /* function exit code */
11264   __pyx_L1_error:;
11265   __Pyx_XDECREF(__pyx_t_1);
11266   __Pyx_XDECREF(__pyx_t_2);
11267   __Pyx_AddTraceback("lxml.objectify.NumberElement.__abs__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11268   __pyx_r = NULL;
11269   __pyx_L0:;
11270   __Pyx_XGIVEREF(__pyx_r);
11271   __Pyx_RefNannyFinishContext();
11272   return __pyx_r;
11273 }
11274
11275 /* "lxml/objectify.pyx":688
11276  *         return abs( _numericValueOf(self) )
11277  * 
11278  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
11279  *         return bool(_numericValueOf(self))
11280  * 
11281  */
11282
11283 /* Python wrapper */
11284 static int __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__(PyObject *__pyx_v_self); /*proto*/
11285 static int __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__(PyObject *__pyx_v_self) {
11286   int __pyx_r;
11287   __Pyx_RefNannyDeclarations
11288   __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
11289   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_42__nonzero__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11290
11291   /* function exit code */
11292   __Pyx_RefNannyFinishContext();
11293   return __pyx_r;
11294 }
11295
11296 static int __pyx_pf_4lxml_9objectify_13NumberElement_42__nonzero__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11297   int __pyx_r;
11298   __Pyx_RefNannyDeclarations
11299   PyObject *__pyx_t_1 = NULL;
11300   int __pyx_t_2;
11301   int __pyx_lineno = 0;
11302   const char *__pyx_filename = NULL;
11303   int __pyx_clineno = 0;
11304   __Pyx_RefNannySetupContext("__nonzero__", 0);
11305
11306   /* "lxml/objectify.pyx":689
11307  * 
11308  *     def __nonzero__(self):
11309  *         return bool(_numericValueOf(self))             # <<<<<<<<<<<<<<
11310  * 
11311  *     def __invert__(self):
11312  */
11313   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
11314   __Pyx_GOTREF(__pyx_t_1);
11315   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 689, __pyx_L1_error)
11316   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11317   __pyx_r = (!(!__pyx_t_2));
11318   goto __pyx_L0;
11319
11320   /* "lxml/objectify.pyx":688
11321  *         return abs( _numericValueOf(self) )
11322  * 
11323  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
11324  *         return bool(_numericValueOf(self))
11325  * 
11326  */
11327
11328   /* function exit code */
11329   __pyx_L1_error:;
11330   __Pyx_XDECREF(__pyx_t_1);
11331   __Pyx_AddTraceback("lxml.objectify.NumberElement.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11332   __pyx_r = -1;
11333   __pyx_L0:;
11334   __Pyx_RefNannyFinishContext();
11335   return __pyx_r;
11336 }
11337
11338 /* "lxml/objectify.pyx":691
11339  *         return bool(_numericValueOf(self))
11340  * 
11341  *     def __invert__(self):             # <<<<<<<<<<<<<<
11342  *         return ~ _numericValueOf(self)
11343  * 
11344  */
11345
11346 /* Python wrapper */
11347 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_45__invert__(PyObject *__pyx_v_self); /*proto*/
11348 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_45__invert__(PyObject *__pyx_v_self) {
11349   PyObject *__pyx_r = 0;
11350   __Pyx_RefNannyDeclarations
11351   __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
11352   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_44__invert__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11353
11354   /* function exit code */
11355   __Pyx_RefNannyFinishContext();
11356   return __pyx_r;
11357 }
11358
11359 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_44__invert__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11360   PyObject *__pyx_r = NULL;
11361   __Pyx_RefNannyDeclarations
11362   PyObject *__pyx_t_1 = NULL;
11363   PyObject *__pyx_t_2 = NULL;
11364   int __pyx_lineno = 0;
11365   const char *__pyx_filename = NULL;
11366   int __pyx_clineno = 0;
11367   __Pyx_RefNannySetupContext("__invert__", 0);
11368
11369   /* "lxml/objectify.pyx":692
11370  * 
11371  *     def __invert__(self):
11372  *         return ~ _numericValueOf(self)             # <<<<<<<<<<<<<<
11373  * 
11374  *     def __lshift__(self, other):
11375  */
11376   __Pyx_XDECREF(__pyx_r);
11377   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
11378   __Pyx_GOTREF(__pyx_t_1);
11379   __pyx_t_2 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
11380   __Pyx_GOTREF(__pyx_t_2);
11381   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11382   __pyx_r = __pyx_t_2;
11383   __pyx_t_2 = 0;
11384   goto __pyx_L0;
11385
11386   /* "lxml/objectify.pyx":691
11387  *         return bool(_numericValueOf(self))
11388  * 
11389  *     def __invert__(self):             # <<<<<<<<<<<<<<
11390  *         return ~ _numericValueOf(self)
11391  * 
11392  */
11393
11394   /* function exit code */
11395   __pyx_L1_error:;
11396   __Pyx_XDECREF(__pyx_t_1);
11397   __Pyx_XDECREF(__pyx_t_2);
11398   __Pyx_AddTraceback("lxml.objectify.NumberElement.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11399   __pyx_r = NULL;
11400   __pyx_L0:;
11401   __Pyx_XGIVEREF(__pyx_r);
11402   __Pyx_RefNannyFinishContext();
11403   return __pyx_r;
11404 }
11405
11406 /* "lxml/objectify.pyx":694
11407  *         return ~ _numericValueOf(self)
11408  * 
11409  *     def __lshift__(self, other):             # <<<<<<<<<<<<<<
11410  *         return _numericValueOf(self) << _numericValueOf(other)
11411  * 
11412  */
11413
11414 /* Python wrapper */
11415 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11416 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11417   PyObject *__pyx_r = 0;
11418   __Pyx_RefNannyDeclarations
11419   __Pyx_RefNannySetupContext("__lshift__ (wrapper)", 0);
11420   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_46__lshift__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11421
11422   /* function exit code */
11423   __Pyx_RefNannyFinishContext();
11424   return __pyx_r;
11425 }
11426
11427 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_46__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11428   PyObject *__pyx_r = NULL;
11429   __Pyx_RefNannyDeclarations
11430   PyObject *__pyx_t_1 = NULL;
11431   PyObject *__pyx_t_2 = NULL;
11432   PyObject *__pyx_t_3 = NULL;
11433   int __pyx_lineno = 0;
11434   const char *__pyx_filename = NULL;
11435   int __pyx_clineno = 0;
11436   __Pyx_RefNannySetupContext("__lshift__", 0);
11437
11438   /* "lxml/objectify.pyx":695
11439  * 
11440  *     def __lshift__(self, other):
11441  *         return _numericValueOf(self) << _numericValueOf(other)             # <<<<<<<<<<<<<<
11442  * 
11443  *     def __rshift__(self, other):
11444  */
11445   __Pyx_XDECREF(__pyx_r);
11446   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
11447   __Pyx_GOTREF(__pyx_t_1);
11448   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
11449   __Pyx_GOTREF(__pyx_t_2);
11450   __pyx_t_3 = PyNumber_Lshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error)
11451   __Pyx_GOTREF(__pyx_t_3);
11452   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11453   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11454   __pyx_r = __pyx_t_3;
11455   __pyx_t_3 = 0;
11456   goto __pyx_L0;
11457
11458   /* "lxml/objectify.pyx":694
11459  *         return ~ _numericValueOf(self)
11460  * 
11461  *     def __lshift__(self, other):             # <<<<<<<<<<<<<<
11462  *         return _numericValueOf(self) << _numericValueOf(other)
11463  * 
11464  */
11465
11466   /* function exit code */
11467   __pyx_L1_error:;
11468   __Pyx_XDECREF(__pyx_t_1);
11469   __Pyx_XDECREF(__pyx_t_2);
11470   __Pyx_XDECREF(__pyx_t_3);
11471   __Pyx_AddTraceback("lxml.objectify.NumberElement.__lshift__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11472   __pyx_r = NULL;
11473   __pyx_L0:;
11474   __Pyx_XGIVEREF(__pyx_r);
11475   __Pyx_RefNannyFinishContext();
11476   return __pyx_r;
11477 }
11478
11479 /* "lxml/objectify.pyx":697
11480  *         return _numericValueOf(self) << _numericValueOf(other)
11481  * 
11482  *     def __rshift__(self, other):             # <<<<<<<<<<<<<<
11483  *         return _numericValueOf(self) >> _numericValueOf(other)
11484  * 
11485  */
11486
11487 /* Python wrapper */
11488 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11489 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11490   PyObject *__pyx_r = 0;
11491   __Pyx_RefNannyDeclarations
11492   __Pyx_RefNannySetupContext("__rshift__ (wrapper)", 0);
11493   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_48__rshift__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11494
11495   /* function exit code */
11496   __Pyx_RefNannyFinishContext();
11497   return __pyx_r;
11498 }
11499
11500 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_48__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11501   PyObject *__pyx_r = NULL;
11502   __Pyx_RefNannyDeclarations
11503   PyObject *__pyx_t_1 = NULL;
11504   PyObject *__pyx_t_2 = NULL;
11505   PyObject *__pyx_t_3 = NULL;
11506   int __pyx_lineno = 0;
11507   const char *__pyx_filename = NULL;
11508   int __pyx_clineno = 0;
11509   __Pyx_RefNannySetupContext("__rshift__", 0);
11510
11511   /* "lxml/objectify.pyx":698
11512  * 
11513  *     def __rshift__(self, other):
11514  *         return _numericValueOf(self) >> _numericValueOf(other)             # <<<<<<<<<<<<<<
11515  * 
11516  *     def __and__(self, other):
11517  */
11518   __Pyx_XDECREF(__pyx_r);
11519   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
11520   __Pyx_GOTREF(__pyx_t_1);
11521   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
11522   __Pyx_GOTREF(__pyx_t_2);
11523   __pyx_t_3 = PyNumber_Rshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error)
11524   __Pyx_GOTREF(__pyx_t_3);
11525   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11526   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11527   __pyx_r = __pyx_t_3;
11528   __pyx_t_3 = 0;
11529   goto __pyx_L0;
11530
11531   /* "lxml/objectify.pyx":697
11532  *         return _numericValueOf(self) << _numericValueOf(other)
11533  * 
11534  *     def __rshift__(self, other):             # <<<<<<<<<<<<<<
11535  *         return _numericValueOf(self) >> _numericValueOf(other)
11536  * 
11537  */
11538
11539   /* function exit code */
11540   __pyx_L1_error:;
11541   __Pyx_XDECREF(__pyx_t_1);
11542   __Pyx_XDECREF(__pyx_t_2);
11543   __Pyx_XDECREF(__pyx_t_3);
11544   __Pyx_AddTraceback("lxml.objectify.NumberElement.__rshift__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11545   __pyx_r = NULL;
11546   __pyx_L0:;
11547   __Pyx_XGIVEREF(__pyx_r);
11548   __Pyx_RefNannyFinishContext();
11549   return __pyx_r;
11550 }
11551
11552 /* "lxml/objectify.pyx":700
11553  *         return _numericValueOf(self) >> _numericValueOf(other)
11554  * 
11555  *     def __and__(self, other):             # <<<<<<<<<<<<<<
11556  *         return _numericValueOf(self) & _numericValueOf(other)
11557  * 
11558  */
11559
11560 /* Python wrapper */
11561 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_51__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11562 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_51__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11563   PyObject *__pyx_r = 0;
11564   __Pyx_RefNannyDeclarations
11565   __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
11566   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_50__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11567
11568   /* function exit code */
11569   __Pyx_RefNannyFinishContext();
11570   return __pyx_r;
11571 }
11572
11573 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_50__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11574   PyObject *__pyx_r = NULL;
11575   __Pyx_RefNannyDeclarations
11576   PyObject *__pyx_t_1 = NULL;
11577   PyObject *__pyx_t_2 = NULL;
11578   PyObject *__pyx_t_3 = NULL;
11579   int __pyx_lineno = 0;
11580   const char *__pyx_filename = NULL;
11581   int __pyx_clineno = 0;
11582   __Pyx_RefNannySetupContext("__and__", 0);
11583
11584   /* "lxml/objectify.pyx":701
11585  * 
11586  *     def __and__(self, other):
11587  *         return _numericValueOf(self) & _numericValueOf(other)             # <<<<<<<<<<<<<<
11588  * 
11589  *     def __or__(self, other):
11590  */
11591   __Pyx_XDECREF(__pyx_r);
11592   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
11593   __Pyx_GOTREF(__pyx_t_1);
11594   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
11595   __Pyx_GOTREF(__pyx_t_2);
11596   __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error)
11597   __Pyx_GOTREF(__pyx_t_3);
11598   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11599   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11600   __pyx_r = __pyx_t_3;
11601   __pyx_t_3 = 0;
11602   goto __pyx_L0;
11603
11604   /* "lxml/objectify.pyx":700
11605  *         return _numericValueOf(self) >> _numericValueOf(other)
11606  * 
11607  *     def __and__(self, other):             # <<<<<<<<<<<<<<
11608  *         return _numericValueOf(self) & _numericValueOf(other)
11609  * 
11610  */
11611
11612   /* function exit code */
11613   __pyx_L1_error:;
11614   __Pyx_XDECREF(__pyx_t_1);
11615   __Pyx_XDECREF(__pyx_t_2);
11616   __Pyx_XDECREF(__pyx_t_3);
11617   __Pyx_AddTraceback("lxml.objectify.NumberElement.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11618   __pyx_r = NULL;
11619   __pyx_L0:;
11620   __Pyx_XGIVEREF(__pyx_r);
11621   __Pyx_RefNannyFinishContext();
11622   return __pyx_r;
11623 }
11624
11625 /* "lxml/objectify.pyx":703
11626  *         return _numericValueOf(self) & _numericValueOf(other)
11627  * 
11628  *     def __or__(self, other):             # <<<<<<<<<<<<<<
11629  *         return _numericValueOf(self) | _numericValueOf(other)
11630  * 
11631  */
11632
11633 /* Python wrapper */
11634 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_53__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11635 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_53__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11636   PyObject *__pyx_r = 0;
11637   __Pyx_RefNannyDeclarations
11638   __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
11639   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_52__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11640
11641   /* function exit code */
11642   __Pyx_RefNannyFinishContext();
11643   return __pyx_r;
11644 }
11645
11646 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_52__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11647   PyObject *__pyx_r = NULL;
11648   __Pyx_RefNannyDeclarations
11649   PyObject *__pyx_t_1 = NULL;
11650   PyObject *__pyx_t_2 = NULL;
11651   PyObject *__pyx_t_3 = NULL;
11652   int __pyx_lineno = 0;
11653   const char *__pyx_filename = NULL;
11654   int __pyx_clineno = 0;
11655   __Pyx_RefNannySetupContext("__or__", 0);
11656
11657   /* "lxml/objectify.pyx":704
11658  * 
11659  *     def __or__(self, other):
11660  *         return _numericValueOf(self) | _numericValueOf(other)             # <<<<<<<<<<<<<<
11661  * 
11662  *     def __xor__(self, other):
11663  */
11664   __Pyx_XDECREF(__pyx_r);
11665   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
11666   __Pyx_GOTREF(__pyx_t_1);
11667   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error)
11668   __Pyx_GOTREF(__pyx_t_2);
11669   __pyx_t_3 = PyNumber_Or(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L1_error)
11670   __Pyx_GOTREF(__pyx_t_3);
11671   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11672   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11673   __pyx_r = __pyx_t_3;
11674   __pyx_t_3 = 0;
11675   goto __pyx_L0;
11676
11677   /* "lxml/objectify.pyx":703
11678  *         return _numericValueOf(self) & _numericValueOf(other)
11679  * 
11680  *     def __or__(self, other):             # <<<<<<<<<<<<<<
11681  *         return _numericValueOf(self) | _numericValueOf(other)
11682  * 
11683  */
11684
11685   /* function exit code */
11686   __pyx_L1_error:;
11687   __Pyx_XDECREF(__pyx_t_1);
11688   __Pyx_XDECREF(__pyx_t_2);
11689   __Pyx_XDECREF(__pyx_t_3);
11690   __Pyx_AddTraceback("lxml.objectify.NumberElement.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11691   __pyx_r = NULL;
11692   __pyx_L0:;
11693   __Pyx_XGIVEREF(__pyx_r);
11694   __Pyx_RefNannyFinishContext();
11695   return __pyx_r;
11696 }
11697
11698 /* "lxml/objectify.pyx":706
11699  *         return _numericValueOf(self) | _numericValueOf(other)
11700  * 
11701  *     def __xor__(self, other):             # <<<<<<<<<<<<<<
11702  *         return _numericValueOf(self) ^ _numericValueOf(other)
11703  * 
11704  */
11705
11706 /* Python wrapper */
11707 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_55__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11708 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_55__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11709   PyObject *__pyx_r = 0;
11710   __Pyx_RefNannyDeclarations
11711   __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
11712   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_54__xor__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11713
11714   /* function exit code */
11715   __Pyx_RefNannyFinishContext();
11716   return __pyx_r;
11717 }
11718
11719 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_54__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11720   PyObject *__pyx_r = NULL;
11721   __Pyx_RefNannyDeclarations
11722   PyObject *__pyx_t_1 = NULL;
11723   PyObject *__pyx_t_2 = NULL;
11724   PyObject *__pyx_t_3 = NULL;
11725   int __pyx_lineno = 0;
11726   const char *__pyx_filename = NULL;
11727   int __pyx_clineno = 0;
11728   __Pyx_RefNannySetupContext("__xor__", 0);
11729
11730   /* "lxml/objectify.pyx":707
11731  * 
11732  *     def __xor__(self, other):
11733  *         return _numericValueOf(self) ^ _numericValueOf(other)             # <<<<<<<<<<<<<<
11734  * 
11735  * cdef class IntElement(NumberElement):
11736  */
11737   __Pyx_XDECREF(__pyx_r);
11738   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
11739   __Pyx_GOTREF(__pyx_t_1);
11740   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
11741   __Pyx_GOTREF(__pyx_t_2);
11742   __pyx_t_3 = PyNumber_Xor(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error)
11743   __Pyx_GOTREF(__pyx_t_3);
11744   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11745   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11746   __pyx_r = __pyx_t_3;
11747   __pyx_t_3 = 0;
11748   goto __pyx_L0;
11749
11750   /* "lxml/objectify.pyx":706
11751  *         return _numericValueOf(self) | _numericValueOf(other)
11752  * 
11753  *     def __xor__(self, other):             # <<<<<<<<<<<<<<
11754  *         return _numericValueOf(self) ^ _numericValueOf(other)
11755  * 
11756  */
11757
11758   /* function exit code */
11759   __pyx_L1_error:;
11760   __Pyx_XDECREF(__pyx_t_1);
11761   __Pyx_XDECREF(__pyx_t_2);
11762   __Pyx_XDECREF(__pyx_t_3);
11763   __Pyx_AddTraceback("lxml.objectify.NumberElement.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11764   __pyx_r = NULL;
11765   __pyx_L0:;
11766   __Pyx_XGIVEREF(__pyx_r);
11767   __Pyx_RefNannyFinishContext();
11768   return __pyx_r;
11769 }
11770
11771 /* "lxml/objectify.pyx":710
11772  * 
11773  * cdef class IntElement(NumberElement):
11774  *     def _init(self):             # <<<<<<<<<<<<<<
11775  *         self._parse_value = int
11776  * 
11777  */
11778
11779 /* Python wrapper */
11780 static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11781 static PyMethodDef __pyx_mdef_4lxml_9objectify_10IntElement_1_init = {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_10IntElement_1_init, METH_NOARGS, 0};
11782 static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11783   PyObject *__pyx_r = 0;
11784   __Pyx_RefNannyDeclarations
11785   __Pyx_RefNannySetupContext("_init (wrapper)", 0);
11786   __pyx_r = __pyx_pf_4lxml_9objectify_10IntElement__init(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self));
11787
11788   /* function exit code */
11789   __Pyx_RefNannyFinishContext();
11790   return __pyx_r;
11791 }
11792
11793 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self) {
11794   PyObject *__pyx_r = NULL;
11795   __Pyx_RefNannyDeclarations
11796   __Pyx_RefNannySetupContext("_init", 0);
11797
11798   /* "lxml/objectify.pyx":711
11799  * cdef class IntElement(NumberElement):
11800  *     def _init(self):
11801  *         self._parse_value = int             # <<<<<<<<<<<<<<
11802  * 
11803  *     def __index__(self):
11804  */
11805   __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
11806   __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
11807   __Pyx_GOTREF(__pyx_v_self->__pyx_base._parse_value);
11808   __Pyx_DECREF(__pyx_v_self->__pyx_base._parse_value);
11809   __pyx_v_self->__pyx_base._parse_value = ((PyObject *)(&PyInt_Type));
11810
11811   /* "lxml/objectify.pyx":710
11812  * 
11813  * cdef class IntElement(NumberElement):
11814  *     def _init(self):             # <<<<<<<<<<<<<<
11815  *         self._parse_value = int
11816  * 
11817  */
11818
11819   /* function exit code */
11820   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11821   __Pyx_XGIVEREF(__pyx_r);
11822   __Pyx_RefNannyFinishContext();
11823   return __pyx_r;
11824 }
11825
11826 /* "lxml/objectify.pyx":713
11827  *         self._parse_value = int
11828  * 
11829  *     def __index__(self):             # <<<<<<<<<<<<<<
11830  *         return int(_parseNumber(self))
11831  * 
11832  */
11833
11834 /* Python wrapper */
11835 static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_3__index__(PyObject *__pyx_v_self); /*proto*/
11836 static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_3__index__(PyObject *__pyx_v_self) {
11837   PyObject *__pyx_r = 0;
11838   __Pyx_RefNannyDeclarations
11839   __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
11840   __pyx_r = __pyx_pf_4lxml_9objectify_10IntElement_2__index__(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self));
11841
11842   /* function exit code */
11843   __Pyx_RefNannyFinishContext();
11844   return __pyx_r;
11845 }
11846
11847 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement_2__index__(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self) {
11848   PyObject *__pyx_r = NULL;
11849   __Pyx_RefNannyDeclarations
11850   PyObject *__pyx_t_1 = NULL;
11851   PyObject *__pyx_t_2 = NULL;
11852   int __pyx_lineno = 0;
11853   const char *__pyx_filename = NULL;
11854   int __pyx_clineno = 0;
11855   __Pyx_RefNannySetupContext("__index__", 0);
11856
11857   /* "lxml/objectify.pyx":714
11858  * 
11859  *     def __index__(self):
11860  *         return int(_parseNumber(self))             # <<<<<<<<<<<<<<
11861  * 
11862  * cdef class LongElement(NumberElement):
11863  */
11864   __Pyx_XDECREF(__pyx_r);
11865   __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)
11866   __Pyx_GOTREF(__pyx_t_1);
11867   __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
11868   __Pyx_GOTREF(__pyx_t_2);
11869   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11870   __pyx_r = __pyx_t_2;
11871   __pyx_t_2 = 0;
11872   goto __pyx_L0;
11873
11874   /* "lxml/objectify.pyx":713
11875  *         self._parse_value = int
11876  * 
11877  *     def __index__(self):             # <<<<<<<<<<<<<<
11878  *         return int(_parseNumber(self))
11879  * 
11880  */
11881
11882   /* function exit code */
11883   __pyx_L1_error:;
11884   __Pyx_XDECREF(__pyx_t_1);
11885   __Pyx_XDECREF(__pyx_t_2);
11886   __Pyx_AddTraceback("lxml.objectify.IntElement.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11887   __pyx_r = NULL;
11888   __pyx_L0:;
11889   __Pyx_XGIVEREF(__pyx_r);
11890   __Pyx_RefNannyFinishContext();
11891   return __pyx_r;
11892 }
11893
11894 /* "lxml/objectify.pyx":717
11895  * 
11896  * cdef class LongElement(NumberElement):
11897  *     def _init(self):             # <<<<<<<<<<<<<<
11898  *         self._parse_value = long
11899  * 
11900  */
11901
11902 /* Python wrapper */
11903 static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11904 static PyMethodDef __pyx_mdef_4lxml_9objectify_11LongElement_1_init = {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_11LongElement_1_init, METH_NOARGS, 0};
11905 static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11906   PyObject *__pyx_r = 0;
11907   __Pyx_RefNannyDeclarations
11908   __Pyx_RefNannySetupContext("_init (wrapper)", 0);
11909   __pyx_r = __pyx_pf_4lxml_9objectify_11LongElement__init(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self));
11910
11911   /* function exit code */
11912   __Pyx_RefNannyFinishContext();
11913   return __pyx_r;
11914 }
11915
11916 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self) {
11917   PyObject *__pyx_r = NULL;
11918   __Pyx_RefNannyDeclarations
11919   __Pyx_RefNannySetupContext("_init", 0);
11920
11921   /* "lxml/objectify.pyx":718
11922  * cdef class LongElement(NumberElement):
11923  *     def _init(self):
11924  *         self._parse_value = long             # <<<<<<<<<<<<<<
11925  * 
11926  *     def __index__(self):
11927  */
11928   __Pyx_INCREF(((PyObject *)(&PyLong_Type)));
11929   __Pyx_GIVEREF(((PyObject *)(&PyLong_Type)));
11930   __Pyx_GOTREF(__pyx_v_self->__pyx_base._parse_value);
11931   __Pyx_DECREF(__pyx_v_self->__pyx_base._parse_value);
11932   __pyx_v_self->__pyx_base._parse_value = ((PyObject *)(&PyLong_Type));
11933
11934   /* "lxml/objectify.pyx":717
11935  * 
11936  * cdef class LongElement(NumberElement):
11937  *     def _init(self):             # <<<<<<<<<<<<<<
11938  *         self._parse_value = long
11939  * 
11940  */
11941
11942   /* function exit code */
11943   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11944   __Pyx_XGIVEREF(__pyx_r);
11945   __Pyx_RefNannyFinishContext();
11946   return __pyx_r;
11947 }
11948
11949 /* "lxml/objectify.pyx":720
11950  *         self._parse_value = long
11951  * 
11952  *     def __index__(self):             # <<<<<<<<<<<<<<
11953  *         return int(_parseNumber(self))
11954  * 
11955  */
11956
11957 /* Python wrapper */
11958 static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_3__index__(PyObject *__pyx_v_self); /*proto*/
11959 static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_3__index__(PyObject *__pyx_v_self) {
11960   PyObject *__pyx_r = 0;
11961   __Pyx_RefNannyDeclarations
11962   __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
11963   __pyx_r = __pyx_pf_4lxml_9objectify_11LongElement_2__index__(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self));
11964
11965   /* function exit code */
11966   __Pyx_RefNannyFinishContext();
11967   return __pyx_r;
11968 }
11969
11970 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement_2__index__(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self) {
11971   PyObject *__pyx_r = NULL;
11972   __Pyx_RefNannyDeclarations
11973   PyObject *__pyx_t_1 = NULL;
11974   PyObject *__pyx_t_2 = NULL;
11975   int __pyx_lineno = 0;
11976   const char *__pyx_filename = NULL;
11977   int __pyx_clineno = 0;
11978   __Pyx_RefNannySetupContext("__index__", 0);
11979
11980   /* "lxml/objectify.pyx":721
11981  * 
11982  *     def __index__(self):
11983  *         return int(_parseNumber(self))             # <<<<<<<<<<<<<<
11984  * 
11985  * cdef class FloatElement(NumberElement):
11986  */
11987   __Pyx_XDECREF(__pyx_r);
11988   __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)
11989   __Pyx_GOTREF(__pyx_t_1);
11990   __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
11991   __Pyx_GOTREF(__pyx_t_2);
11992   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11993   __pyx_r = __pyx_t_2;
11994   __pyx_t_2 = 0;
11995   goto __pyx_L0;
11996
11997   /* "lxml/objectify.pyx":720
11998  *         self._parse_value = long
11999  * 
12000  *     def __index__(self):             # <<<<<<<<<<<<<<
12001  *         return int(_parseNumber(self))
12002  * 
12003  */
12004
12005   /* function exit code */
12006   __pyx_L1_error:;
12007   __Pyx_XDECREF(__pyx_t_1);
12008   __Pyx_XDECREF(__pyx_t_2);
12009   __Pyx_AddTraceback("lxml.objectify.LongElement.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12010   __pyx_r = NULL;
12011   __pyx_L0:;
12012   __Pyx_XGIVEREF(__pyx_r);
12013   __Pyx_RefNannyFinishContext();
12014   return __pyx_r;
12015 }
12016
12017 /* "lxml/objectify.pyx":724
12018  * 
12019  * cdef class FloatElement(NumberElement):
12020  *     def _init(self):             # <<<<<<<<<<<<<<
12021  *         self._parse_value = float
12022  * 
12023  */
12024
12025 /* Python wrapper */
12026 static PyObject *__pyx_pw_4lxml_9objectify_12FloatElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12027 static PyMethodDef __pyx_mdef_4lxml_9objectify_12FloatElement_1_init = {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_12FloatElement_1_init, METH_NOARGS, 0};
12028 static PyObject *__pyx_pw_4lxml_9objectify_12FloatElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12029   PyObject *__pyx_r = 0;
12030   __Pyx_RefNannyDeclarations
12031   __Pyx_RefNannySetupContext("_init (wrapper)", 0);
12032   __pyx_r = __pyx_pf_4lxml_9objectify_12FloatElement__init(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self));
12033
12034   /* function exit code */
12035   __Pyx_RefNannyFinishContext();
12036   return __pyx_r;
12037 }
12038
12039 static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(struct __pyx_obj_4lxml_9objectify_FloatElement *__pyx_v_self) {
12040   PyObject *__pyx_r = NULL;
12041   __Pyx_RefNannyDeclarations
12042   __Pyx_RefNannySetupContext("_init", 0);
12043
12044   /* "lxml/objectify.pyx":725
12045  * cdef class FloatElement(NumberElement):
12046  *     def _init(self):
12047  *         self._parse_value = float             # <<<<<<<<<<<<<<
12048  * 
12049  * cdef class StringElement(ObjectifiedDataElement):
12050  */
12051   __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
12052   __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
12053   __Pyx_GOTREF(__pyx_v_self->__pyx_base._parse_value);
12054   __Pyx_DECREF(__pyx_v_self->__pyx_base._parse_value);
12055   __pyx_v_self->__pyx_base._parse_value = ((PyObject *)(&PyFloat_Type));
12056
12057   /* "lxml/objectify.pyx":724
12058  * 
12059  * cdef class FloatElement(NumberElement):
12060  *     def _init(self):             # <<<<<<<<<<<<<<
12061  *         self._parse_value = float
12062  * 
12063  */
12064
12065   /* function exit code */
12066   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12067   __Pyx_XGIVEREF(__pyx_r);
12068   __Pyx_RefNannyFinishContext();
12069   return __pyx_r;
12070 }
12071
12072 /* "lxml/objectify.pyx":735
12073  *     """
12074  *     @property
12075  *     def pyval(self):             # <<<<<<<<<<<<<<
12076  *         return textOf(self._c_node) or u''
12077  * 
12078  */
12079
12080 /* Python wrapper */
12081 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
12082 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_5pyval_1__get__(PyObject *__pyx_v_self) {
12083   PyObject *__pyx_r = 0;
12084   __Pyx_RefNannyDeclarations
12085   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12086   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12087
12088   /* function exit code */
12089   __Pyx_RefNannyFinishContext();
12090   return __pyx_r;
12091 }
12092
12093 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12094   PyObject *__pyx_r = NULL;
12095   __Pyx_RefNannyDeclarations
12096   PyObject *__pyx_t_1 = NULL;
12097   PyObject *__pyx_t_2 = NULL;
12098   int __pyx_t_3;
12099   int __pyx_lineno = 0;
12100   const char *__pyx_filename = NULL;
12101   int __pyx_clineno = 0;
12102   __Pyx_RefNannySetupContext("__get__", 0);
12103
12104   /* "lxml/objectify.pyx":736
12105  *     @property
12106  *     def pyval(self):
12107  *         return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
12108  * 
12109  *     def __repr__(self):
12110  */
12111   __Pyx_XDECREF(__pyx_r);
12112   __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)
12113   __Pyx_GOTREF(__pyx_t_2);
12114   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 736, __pyx_L1_error)
12115   if (!__pyx_t_3) {
12116     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12117   } else {
12118     __Pyx_INCREF(__pyx_t_2);
12119     __pyx_t_1 = __pyx_t_2;
12120     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12121     goto __pyx_L3_bool_binop_done;
12122   }
12123   __Pyx_INCREF(__pyx_kp_u_);
12124   __pyx_t_1 = __pyx_kp_u_;
12125   __pyx_L3_bool_binop_done:;
12126   __pyx_r = __pyx_t_1;
12127   __pyx_t_1 = 0;
12128   goto __pyx_L0;
12129
12130   /* "lxml/objectify.pyx":735
12131  *     """
12132  *     @property
12133  *     def pyval(self):             # <<<<<<<<<<<<<<
12134  *         return textOf(self._c_node) or u''
12135  * 
12136  */
12137
12138   /* function exit code */
12139   __pyx_L1_error:;
12140   __Pyx_XDECREF(__pyx_t_1);
12141   __Pyx_XDECREF(__pyx_t_2);
12142   __Pyx_AddTraceback("lxml.objectify.StringElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12143   __pyx_r = NULL;
12144   __pyx_L0:;
12145   __Pyx_XGIVEREF(__pyx_r);
12146   __Pyx_RefNannyFinishContext();
12147   return __pyx_r;
12148 }
12149
12150 /* "lxml/objectify.pyx":738
12151  *         return textOf(self._c_node) or u''
12152  * 
12153  *     def __repr__(self):             # <<<<<<<<<<<<<<
12154  *         return repr(textOf(self._c_node) or u'')
12155  * 
12156  */
12157
12158 /* Python wrapper */
12159 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_1__repr__(PyObject *__pyx_v_self); /*proto*/
12160 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_1__repr__(PyObject *__pyx_v_self) {
12161   PyObject *__pyx_r = 0;
12162   __Pyx_RefNannyDeclarations
12163   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
12164   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement___repr__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12165
12166   /* function exit code */
12167   __Pyx_RefNannyFinishContext();
12168   return __pyx_r;
12169 }
12170
12171 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12172   PyObject *__pyx_r = NULL;
12173   __Pyx_RefNannyDeclarations
12174   PyObject *__pyx_t_1 = NULL;
12175   PyObject *__pyx_t_2 = NULL;
12176   int __pyx_t_3;
12177   int __pyx_lineno = 0;
12178   const char *__pyx_filename = NULL;
12179   int __pyx_clineno = 0;
12180   __Pyx_RefNannySetupContext("__repr__", 0);
12181
12182   /* "lxml/objectify.pyx":739
12183  * 
12184  *     def __repr__(self):
12185  *         return repr(textOf(self._c_node) or u'')             # <<<<<<<<<<<<<<
12186  * 
12187  *     def strlen(self):
12188  */
12189   __Pyx_XDECREF(__pyx_r);
12190   __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)
12191   __Pyx_GOTREF(__pyx_t_2);
12192   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
12193   if (!__pyx_t_3) {
12194     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12195   } else {
12196     __Pyx_INCREF(__pyx_t_2);
12197     __pyx_t_1 = __pyx_t_2;
12198     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12199     goto __pyx_L3_bool_binop_done;
12200   }
12201   __Pyx_INCREF(__pyx_kp_u_);
12202   __pyx_t_1 = __pyx_kp_u_;
12203   __pyx_L3_bool_binop_done:;
12204   __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error)
12205   __Pyx_GOTREF(__pyx_t_2);
12206   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12207   __pyx_r = __pyx_t_2;
12208   __pyx_t_2 = 0;
12209   goto __pyx_L0;
12210
12211   /* "lxml/objectify.pyx":738
12212  *         return textOf(self._c_node) or u''
12213  * 
12214  *     def __repr__(self):             # <<<<<<<<<<<<<<
12215  *         return repr(textOf(self._c_node) or u'')
12216  * 
12217  */
12218
12219   /* function exit code */
12220   __pyx_L1_error:;
12221   __Pyx_XDECREF(__pyx_t_1);
12222   __Pyx_XDECREF(__pyx_t_2);
12223   __Pyx_AddTraceback("lxml.objectify.StringElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12224   __pyx_r = NULL;
12225   __pyx_L0:;
12226   __Pyx_XGIVEREF(__pyx_r);
12227   __Pyx_RefNannyFinishContext();
12228   return __pyx_r;
12229 }
12230
12231 /* "lxml/objectify.pyx":741
12232  *         return repr(textOf(self._c_node) or u'')
12233  * 
12234  *     def strlen(self):             # <<<<<<<<<<<<<<
12235  *         text = textOf(self._c_node)
12236  *         if text is None:
12237  */
12238
12239 /* Python wrapper */
12240 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_3strlen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12241 static PyMethodDef __pyx_mdef_4lxml_9objectify_13StringElement_3strlen = {"strlen", (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_3strlen, METH_NOARGS, 0};
12242 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_3strlen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12243   PyObject *__pyx_r = 0;
12244   __Pyx_RefNannyDeclarations
12245   __Pyx_RefNannySetupContext("strlen (wrapper)", 0);
12246   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_2strlen(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12247
12248   /* function exit code */
12249   __Pyx_RefNannyFinishContext();
12250   return __pyx_r;
12251 }
12252
12253 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_2strlen(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12254   PyObject *__pyx_v_text = NULL;
12255   PyObject *__pyx_r = NULL;
12256   __Pyx_RefNannyDeclarations
12257   PyObject *__pyx_t_1 = NULL;
12258   int __pyx_t_2;
12259   int __pyx_t_3;
12260   Py_ssize_t __pyx_t_4;
12261   int __pyx_lineno = 0;
12262   const char *__pyx_filename = NULL;
12263   int __pyx_clineno = 0;
12264   __Pyx_RefNannySetupContext("strlen", 0);
12265
12266   /* "lxml/objectify.pyx":742
12267  * 
12268  *     def strlen(self):
12269  *         text = textOf(self._c_node)             # <<<<<<<<<<<<<<
12270  *         if text is None:
12271  *             return 0
12272  */
12273   __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)
12274   __Pyx_GOTREF(__pyx_t_1);
12275   __pyx_v_text = __pyx_t_1;
12276   __pyx_t_1 = 0;
12277
12278   /* "lxml/objectify.pyx":743
12279  *     def strlen(self):
12280  *         text = textOf(self._c_node)
12281  *         if text is None:             # <<<<<<<<<<<<<<
12282  *             return 0
12283  *         else:
12284  */
12285   __pyx_t_2 = (__pyx_v_text == Py_None);
12286   __pyx_t_3 = (__pyx_t_2 != 0);
12287   if (__pyx_t_3) {
12288
12289     /* "lxml/objectify.pyx":744
12290  *         text = textOf(self._c_node)
12291  *         if text is None:
12292  *             return 0             # <<<<<<<<<<<<<<
12293  *         else:
12294  *             return len(text)
12295  */
12296     __Pyx_XDECREF(__pyx_r);
12297     __Pyx_INCREF(__pyx_int_0);
12298     __pyx_r = __pyx_int_0;
12299     goto __pyx_L0;
12300
12301     /* "lxml/objectify.pyx":743
12302  *     def strlen(self):
12303  *         text = textOf(self._c_node)
12304  *         if text is None:             # <<<<<<<<<<<<<<
12305  *             return 0
12306  *         else:
12307  */
12308   }
12309
12310   /* "lxml/objectify.pyx":746
12311  *             return 0
12312  *         else:
12313  *             return len(text)             # <<<<<<<<<<<<<<
12314  * 
12315  *     def __nonzero__(self):
12316  */
12317   /*else*/ {
12318     __Pyx_XDECREF(__pyx_r);
12319     __pyx_t_4 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 746, __pyx_L1_error)
12320     __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
12321     __Pyx_GOTREF(__pyx_t_1);
12322     __pyx_r = __pyx_t_1;
12323     __pyx_t_1 = 0;
12324     goto __pyx_L0;
12325   }
12326
12327   /* "lxml/objectify.pyx":741
12328  *         return repr(textOf(self._c_node) or u'')
12329  * 
12330  *     def strlen(self):             # <<<<<<<<<<<<<<
12331  *         text = textOf(self._c_node)
12332  *         if text is None:
12333  */
12334
12335   /* function exit code */
12336   __pyx_L1_error:;
12337   __Pyx_XDECREF(__pyx_t_1);
12338   __Pyx_AddTraceback("lxml.objectify.StringElement.strlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
12339   __pyx_r = NULL;
12340   __pyx_L0:;
12341   __Pyx_XDECREF(__pyx_v_text);
12342   __Pyx_XGIVEREF(__pyx_r);
12343   __Pyx_RefNannyFinishContext();
12344   return __pyx_r;
12345 }
12346
12347 /* "lxml/objectify.pyx":748
12348  *             return len(text)
12349  * 
12350  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
12351  *         return bool(textOf(self._c_node))
12352  * 
12353  */
12354
12355 /* Python wrapper */
12356 static int __pyx_pw_4lxml_9objectify_13StringElement_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
12357 static int __pyx_pw_4lxml_9objectify_13StringElement_5__nonzero__(PyObject *__pyx_v_self) {
12358   int __pyx_r;
12359   __Pyx_RefNannyDeclarations
12360   __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
12361   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_4__nonzero__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12362
12363   /* function exit code */
12364   __Pyx_RefNannyFinishContext();
12365   return __pyx_r;
12366 }
12367
12368 static int __pyx_pf_4lxml_9objectify_13StringElement_4__nonzero__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12369   int __pyx_r;
12370   __Pyx_RefNannyDeclarations
12371   PyObject *__pyx_t_1 = NULL;
12372   int __pyx_t_2;
12373   int __pyx_lineno = 0;
12374   const char *__pyx_filename = NULL;
12375   int __pyx_clineno = 0;
12376   __Pyx_RefNannySetupContext("__nonzero__", 0);
12377
12378   /* "lxml/objectify.pyx":749
12379  * 
12380  *     def __nonzero__(self):
12381  *         return bool(textOf(self._c_node))             # <<<<<<<<<<<<<<
12382  * 
12383  *     def __richcmp__(self, other, int op):
12384  */
12385   __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)
12386   __Pyx_GOTREF(__pyx_t_1);
12387   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 749, __pyx_L1_error)
12388   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12389   __pyx_r = (!(!__pyx_t_2));
12390   goto __pyx_L0;
12391
12392   /* "lxml/objectify.pyx":748
12393  *             return len(text)
12394  * 
12395  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
12396  *         return bool(textOf(self._c_node))
12397  * 
12398  */
12399
12400   /* function exit code */
12401   __pyx_L1_error:;
12402   __Pyx_XDECREF(__pyx_t_1);
12403   __Pyx_AddTraceback("lxml.objectify.StringElement.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12404   __pyx_r = -1;
12405   __pyx_L0:;
12406   __Pyx_RefNannyFinishContext();
12407   return __pyx_r;
12408 }
12409
12410 /* "lxml/objectify.pyx":751
12411  *         return bool(textOf(self._c_node))
12412  * 
12413  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
12414  *         return _richcmpPyvals(self, other, op)
12415  * 
12416  */
12417
12418 /* Python wrapper */
12419 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
12420 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
12421   PyObject *__pyx_r = 0;
12422   __Pyx_RefNannyDeclarations
12423   __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
12424   __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));
12425
12426   /* function exit code */
12427   __Pyx_RefNannyFinishContext();
12428   return __pyx_r;
12429 }
12430
12431 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) {
12432   PyObject *__pyx_r = NULL;
12433   __Pyx_RefNannyDeclarations
12434   PyObject *__pyx_t_1 = NULL;
12435   int __pyx_lineno = 0;
12436   const char *__pyx_filename = NULL;
12437   int __pyx_clineno = 0;
12438   __Pyx_RefNannySetupContext("__richcmp__", 0);
12439
12440   /* "lxml/objectify.pyx":752
12441  * 
12442  *     def __richcmp__(self, other, int op):
12443  *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
12444  * 
12445  *     def __hash__(self):
12446  */
12447   __Pyx_XDECREF(__pyx_r);
12448   __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)
12449   __Pyx_GOTREF(__pyx_t_1);
12450   __pyx_r = __pyx_t_1;
12451   __pyx_t_1 = 0;
12452   goto __pyx_L0;
12453
12454   /* "lxml/objectify.pyx":751
12455  *         return bool(textOf(self._c_node))
12456  * 
12457  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
12458  *         return _richcmpPyvals(self, other, op)
12459  * 
12460  */
12461
12462   /* function exit code */
12463   __pyx_L1_error:;
12464   __Pyx_XDECREF(__pyx_t_1);
12465   __Pyx_AddTraceback("lxml.objectify.StringElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12466   __pyx_r = NULL;
12467   __pyx_L0:;
12468   __Pyx_XGIVEREF(__pyx_r);
12469   __Pyx_RefNannyFinishContext();
12470   return __pyx_r;
12471 }
12472
12473 /* "lxml/objectify.pyx":754
12474  *         return _richcmpPyvals(self, other, op)
12475  * 
12476  *     def __hash__(self):             # <<<<<<<<<<<<<<
12477  *         return hash(textOf(self._c_node) or u'')
12478  * 
12479  */
12480
12481 /* Python wrapper */
12482 static Py_hash_t __pyx_pw_4lxml_9objectify_13StringElement_9__hash__(PyObject *__pyx_v_self); /*proto*/
12483 static Py_hash_t __pyx_pw_4lxml_9objectify_13StringElement_9__hash__(PyObject *__pyx_v_self) {
12484   Py_hash_t __pyx_r;
12485   __Pyx_RefNannyDeclarations
12486   __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
12487   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_8__hash__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12488
12489   /* function exit code */
12490   __Pyx_RefNannyFinishContext();
12491   return __pyx_r;
12492 }
12493
12494 static Py_hash_t __pyx_pf_4lxml_9objectify_13StringElement_8__hash__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12495   Py_hash_t __pyx_r;
12496   __Pyx_RefNannyDeclarations
12497   PyObject *__pyx_t_1 = NULL;
12498   PyObject *__pyx_t_2 = NULL;
12499   int __pyx_t_3;
12500   Py_hash_t __pyx_t_4;
12501   int __pyx_lineno = 0;
12502   const char *__pyx_filename = NULL;
12503   int __pyx_clineno = 0;
12504   __Pyx_RefNannySetupContext("__hash__", 0);
12505
12506   /* "lxml/objectify.pyx":755
12507  * 
12508  *     def __hash__(self):
12509  *         return hash(textOf(self._c_node) or u'')             # <<<<<<<<<<<<<<
12510  * 
12511  *     def __add__(self, other):
12512  */
12513   __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)
12514   __Pyx_GOTREF(__pyx_t_2);
12515   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 755, __pyx_L1_error)
12516   if (!__pyx_t_3) {
12517     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12518   } else {
12519     __Pyx_INCREF(__pyx_t_2);
12520     __pyx_t_1 = __pyx_t_2;
12521     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12522     goto __pyx_L3_bool_binop_done;
12523   }
12524   __Pyx_INCREF(__pyx_kp_u_);
12525   __pyx_t_1 = __pyx_kp_u_;
12526   __pyx_L3_bool_binop_done:;
12527   __pyx_t_4 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 755, __pyx_L1_error)
12528   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12529   __pyx_r = __pyx_t_4;
12530   goto __pyx_L0;
12531
12532   /* "lxml/objectify.pyx":754
12533  *         return _richcmpPyvals(self, other, op)
12534  * 
12535  *     def __hash__(self):             # <<<<<<<<<<<<<<
12536  *         return hash(textOf(self._c_node) or u'')
12537  * 
12538  */
12539
12540   /* function exit code */
12541   __pyx_L1_error:;
12542   __Pyx_XDECREF(__pyx_t_1);
12543   __Pyx_XDECREF(__pyx_t_2);
12544   __Pyx_AddTraceback("lxml.objectify.StringElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12545   __pyx_r = -1;
12546   __pyx_L0:;
12547   if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
12548   __Pyx_RefNannyFinishContext();
12549   return __pyx_r;
12550 }
12551
12552 /* "lxml/objectify.pyx":757
12553  *         return hash(textOf(self._c_node) or u'')
12554  * 
12555  *     def __add__(self, other):             # <<<<<<<<<<<<<<
12556  *         text  = _strValueOf(self)
12557  *         other = _strValueOf(other)
12558  */
12559
12560 /* Python wrapper */
12561 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
12562 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12563   PyObject *__pyx_r = 0;
12564   __Pyx_RefNannyDeclarations
12565   __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
12566   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_10__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
12567
12568   /* function exit code */
12569   __Pyx_RefNannyFinishContext();
12570   return __pyx_r;
12571 }
12572
12573 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12574   PyObject *__pyx_v_text = NULL;
12575   PyObject *__pyx_r = NULL;
12576   __Pyx_RefNannyDeclarations
12577   PyObject *__pyx_t_1 = NULL;
12578   int __pyx_t_2;
12579   int __pyx_t_3;
12580   int __pyx_lineno = 0;
12581   const char *__pyx_filename = NULL;
12582   int __pyx_clineno = 0;
12583   __Pyx_RefNannySetupContext("__add__", 0);
12584   __Pyx_INCREF(__pyx_v_other);
12585
12586   /* "lxml/objectify.pyx":758
12587  * 
12588  *     def __add__(self, other):
12589  *         text  = _strValueOf(self)             # <<<<<<<<<<<<<<
12590  *         other = _strValueOf(other)
12591  *         if text is None:
12592  */
12593   __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
12594   __Pyx_GOTREF(__pyx_t_1);
12595   __pyx_v_text = __pyx_t_1;
12596   __pyx_t_1 = 0;
12597
12598   /* "lxml/objectify.pyx":759
12599  *     def __add__(self, other):
12600  *         text  = _strValueOf(self)
12601  *         other = _strValueOf(other)             # <<<<<<<<<<<<<<
12602  *         if text is None:
12603  *             return other
12604  */
12605   __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
12606   __Pyx_GOTREF(__pyx_t_1);
12607   __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_1);
12608   __pyx_t_1 = 0;
12609
12610   /* "lxml/objectify.pyx":760
12611  *         text  = _strValueOf(self)
12612  *         other = _strValueOf(other)
12613  *         if text is None:             # <<<<<<<<<<<<<<
12614  *             return other
12615  *         if other is None:
12616  */
12617   __pyx_t_2 = (__pyx_v_text == Py_None);
12618   __pyx_t_3 = (__pyx_t_2 != 0);
12619   if (__pyx_t_3) {
12620
12621     /* "lxml/objectify.pyx":761
12622  *         other = _strValueOf(other)
12623  *         if text is None:
12624  *             return other             # <<<<<<<<<<<<<<
12625  *         if other is None:
12626  *             return text
12627  */
12628     __Pyx_XDECREF(__pyx_r);
12629     __Pyx_INCREF(__pyx_v_other);
12630     __pyx_r = __pyx_v_other;
12631     goto __pyx_L0;
12632
12633     /* "lxml/objectify.pyx":760
12634  *         text  = _strValueOf(self)
12635  *         other = _strValueOf(other)
12636  *         if text is None:             # <<<<<<<<<<<<<<
12637  *             return other
12638  *         if other is None:
12639  */
12640   }
12641
12642   /* "lxml/objectify.pyx":762
12643  *         if text is None:
12644  *             return other
12645  *         if other is None:             # <<<<<<<<<<<<<<
12646  *             return text
12647  *         return text + other
12648  */
12649   __pyx_t_3 = (__pyx_v_other == Py_None);
12650   __pyx_t_2 = (__pyx_t_3 != 0);
12651   if (__pyx_t_2) {
12652
12653     /* "lxml/objectify.pyx":763
12654  *             return other
12655  *         if other is None:
12656  *             return text             # <<<<<<<<<<<<<<
12657  *         return text + other
12658  * 
12659  */
12660     __Pyx_XDECREF(__pyx_r);
12661     __Pyx_INCREF(__pyx_v_text);
12662     __pyx_r = __pyx_v_text;
12663     goto __pyx_L0;
12664
12665     /* "lxml/objectify.pyx":762
12666  *         if text is None:
12667  *             return other
12668  *         if other is None:             # <<<<<<<<<<<<<<
12669  *             return text
12670  *         return text + other
12671  */
12672   }
12673
12674   /* "lxml/objectify.pyx":764
12675  *         if other is None:
12676  *             return text
12677  *         return text + other             # <<<<<<<<<<<<<<
12678  * 
12679  *     def __mul__(self, other):
12680  */
12681   __Pyx_XDECREF(__pyx_r);
12682   __pyx_t_1 = PyNumber_Add(__pyx_v_text, __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
12683   __Pyx_GOTREF(__pyx_t_1);
12684   __pyx_r = __pyx_t_1;
12685   __pyx_t_1 = 0;
12686   goto __pyx_L0;
12687
12688   /* "lxml/objectify.pyx":757
12689  *         return hash(textOf(self._c_node) or u'')
12690  * 
12691  *     def __add__(self, other):             # <<<<<<<<<<<<<<
12692  *         text  = _strValueOf(self)
12693  *         other = _strValueOf(other)
12694  */
12695
12696   /* function exit code */
12697   __pyx_L1_error:;
12698   __Pyx_XDECREF(__pyx_t_1);
12699   __Pyx_AddTraceback("lxml.objectify.StringElement.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12700   __pyx_r = NULL;
12701   __pyx_L0:;
12702   __Pyx_XDECREF(__pyx_v_text);
12703   __Pyx_XDECREF(__pyx_v_other);
12704   __Pyx_XGIVEREF(__pyx_r);
12705   __Pyx_RefNannyFinishContext();
12706   return __pyx_r;
12707 }
12708
12709 /* "lxml/objectify.pyx":766
12710  *         return text + other
12711  * 
12712  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
12713  *         if isinstance(self, StringElement):
12714  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12715  */
12716
12717 /* Python wrapper */
12718 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_13__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
12719 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_13__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12720   PyObject *__pyx_r = 0;
12721   __Pyx_RefNannyDeclarations
12722   __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
12723   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_12__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
12724
12725   /* function exit code */
12726   __Pyx_RefNannyFinishContext();
12727   return __pyx_r;
12728 }
12729
12730 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_12__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12731   PyObject *__pyx_r = NULL;
12732   __Pyx_RefNannyDeclarations
12733   int __pyx_t_1;
12734   int __pyx_t_2;
12735   PyObject *__pyx_t_3 = NULL;
12736   PyObject *__pyx_t_4 = NULL;
12737   PyObject *__pyx_t_5 = NULL;
12738   int __pyx_lineno = 0;
12739   const char *__pyx_filename = NULL;
12740   int __pyx_clineno = 0;
12741   __Pyx_RefNannySetupContext("__mul__", 0);
12742
12743   /* "lxml/objectify.pyx":767
12744  * 
12745  *     def __mul__(self, other):
12746  *         if isinstance(self, StringElement):             # <<<<<<<<<<<<<<
12747  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12748  *         elif isinstance(other, StringElement):
12749  */
12750   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_4lxml_9objectify_StringElement); 
12751   __pyx_t_2 = (__pyx_t_1 != 0);
12752   if (__pyx_t_2) {
12753
12754     /* "lxml/objectify.pyx":768
12755  *     def __mul__(self, other):
12756  *         if isinstance(self, StringElement):
12757  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)             # <<<<<<<<<<<<<<
12758  *         elif isinstance(other, StringElement):
12759  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
12760  */
12761     __Pyx_XDECREF(__pyx_r);
12762     __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)
12763     __Pyx_GOTREF(__pyx_t_3);
12764     __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 768, __pyx_L1_error)
12765     __Pyx_GOTREF(__pyx_t_4);
12766     __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L1_error)
12767     __Pyx_GOTREF(__pyx_t_5);
12768     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12769     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12770     __pyx_r = __pyx_t_5;
12771     __pyx_t_5 = 0;
12772     goto __pyx_L0;
12773
12774     /* "lxml/objectify.pyx":767
12775  * 
12776  *     def __mul__(self, other):
12777  *         if isinstance(self, StringElement):             # <<<<<<<<<<<<<<
12778  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12779  *         elif isinstance(other, StringElement):
12780  */
12781   }
12782
12783   /* "lxml/objectify.pyx":769
12784  *         if isinstance(self, StringElement):
12785  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12786  *         elif isinstance(other, StringElement):             # <<<<<<<<<<<<<<
12787  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
12788  *         else:
12789  */
12790   __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_4lxml_9objectify_StringElement); 
12791   __pyx_t_1 = (__pyx_t_2 != 0);
12792   if (likely(__pyx_t_1)) {
12793
12794     /* "lxml/objectify.pyx":770
12795  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12796  *         elif isinstance(other, StringElement):
12797  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)             # <<<<<<<<<<<<<<
12798  *         else:
12799  *             raise TypeError, u"invalid types for * operator"
12800  */
12801     __Pyx_XDECREF(__pyx_r);
12802     __pyx_t_5 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 770, __pyx_L1_error)
12803     __Pyx_GOTREF(__pyx_t_5);
12804     __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)
12805     __Pyx_GOTREF(__pyx_t_4);
12806     __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L1_error)
12807     __Pyx_GOTREF(__pyx_t_3);
12808     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12809     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12810     __pyx_r = __pyx_t_3;
12811     __pyx_t_3 = 0;
12812     goto __pyx_L0;
12813
12814     /* "lxml/objectify.pyx":769
12815  *         if isinstance(self, StringElement):
12816  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12817  *         elif isinstance(other, StringElement):             # <<<<<<<<<<<<<<
12818  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
12819  *         else:
12820  */
12821   }
12822
12823   /* "lxml/objectify.pyx":772
12824  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
12825  *         else:
12826  *             raise TypeError, u"invalid types for * operator"             # <<<<<<<<<<<<<<
12827  * 
12828  *     def __mod__(self, other):
12829  */
12830   /*else*/ {
12831     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_invalid_types_for_operator, 0, 0);
12832     __PYX_ERR(0, 772, __pyx_L1_error)
12833   }
12834
12835   /* "lxml/objectify.pyx":766
12836  *         return text + other
12837  * 
12838  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
12839  *         if isinstance(self, StringElement):
12840  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12841  */
12842
12843   /* function exit code */
12844   __pyx_L1_error:;
12845   __Pyx_XDECREF(__pyx_t_3);
12846   __Pyx_XDECREF(__pyx_t_4);
12847   __Pyx_XDECREF(__pyx_t_5);
12848   __Pyx_AddTraceback("lxml.objectify.StringElement.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12849   __pyx_r = NULL;
12850   __pyx_L0:;
12851   __Pyx_XGIVEREF(__pyx_r);
12852   __Pyx_RefNannyFinishContext();
12853   return __pyx_r;
12854 }
12855
12856 /* "lxml/objectify.pyx":774
12857  *             raise TypeError, u"invalid types for * operator"
12858  * 
12859  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
12860  *         return _strValueOf(self) % other
12861  * 
12862  */
12863
12864 /* Python wrapper */
12865 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_15__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
12866 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_15__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12867   PyObject *__pyx_r = 0;
12868   __Pyx_RefNannyDeclarations
12869   __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
12870   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_14__mod__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
12871
12872   /* function exit code */
12873   __Pyx_RefNannyFinishContext();
12874   return __pyx_r;
12875 }
12876
12877 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_14__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12878   PyObject *__pyx_r = NULL;
12879   __Pyx_RefNannyDeclarations
12880   PyObject *__pyx_t_1 = NULL;
12881   PyObject *__pyx_t_2 = NULL;
12882   int __pyx_lineno = 0;
12883   const char *__pyx_filename = NULL;
12884   int __pyx_clineno = 0;
12885   __Pyx_RefNannySetupContext("__mod__", 0);
12886
12887   /* "lxml/objectify.pyx":775
12888  * 
12889  *     def __mod__(self, other):
12890  *         return _strValueOf(self) % other             # <<<<<<<<<<<<<<
12891  * 
12892  *     def __int__(self):
12893  */
12894   __Pyx_XDECREF(__pyx_r);
12895   __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error)
12896   __Pyx_GOTREF(__pyx_t_1);
12897   __pyx_t_2 = PyNumber_Remainder(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
12898   __Pyx_GOTREF(__pyx_t_2);
12899   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12900   __pyx_r = __pyx_t_2;
12901   __pyx_t_2 = 0;
12902   goto __pyx_L0;
12903
12904   /* "lxml/objectify.pyx":774
12905  *             raise TypeError, u"invalid types for * operator"
12906  * 
12907  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
12908  *         return _strValueOf(self) % other
12909  * 
12910  */
12911
12912   /* function exit code */
12913   __pyx_L1_error:;
12914   __Pyx_XDECREF(__pyx_t_1);
12915   __Pyx_XDECREF(__pyx_t_2);
12916   __Pyx_AddTraceback("lxml.objectify.StringElement.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12917   __pyx_r = NULL;
12918   __pyx_L0:;
12919   __Pyx_XGIVEREF(__pyx_r);
12920   __Pyx_RefNannyFinishContext();
12921   return __pyx_r;
12922 }
12923
12924 /* "lxml/objectify.pyx":777
12925  *         return _strValueOf(self) % other
12926  * 
12927  *     def __int__(self):             # <<<<<<<<<<<<<<
12928  *         return int(textOf(self._c_node))
12929  * 
12930  */
12931
12932 /* Python wrapper */
12933 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_17__int__(PyObject *__pyx_v_self); /*proto*/
12934 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_17__int__(PyObject *__pyx_v_self) {
12935   PyObject *__pyx_r = 0;
12936   __Pyx_RefNannyDeclarations
12937   __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
12938   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_16__int__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12939
12940   /* function exit code */
12941   __Pyx_RefNannyFinishContext();
12942   return __pyx_r;
12943 }
12944
12945 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_16__int__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12946   PyObject *__pyx_r = NULL;
12947   __Pyx_RefNannyDeclarations
12948   PyObject *__pyx_t_1 = NULL;
12949   PyObject *__pyx_t_2 = NULL;
12950   int __pyx_lineno = 0;
12951   const char *__pyx_filename = NULL;
12952   int __pyx_clineno = 0;
12953   __Pyx_RefNannySetupContext("__int__", 0);
12954
12955   /* "lxml/objectify.pyx":778
12956  * 
12957  *     def __int__(self):
12958  *         return int(textOf(self._c_node))             # <<<<<<<<<<<<<<
12959  * 
12960  *     def __long__(self):
12961  */
12962   __Pyx_XDECREF(__pyx_r);
12963   __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)
12964   __Pyx_GOTREF(__pyx_t_1);
12965   __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
12966   __Pyx_GOTREF(__pyx_t_2);
12967   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12968   __pyx_r = __pyx_t_2;
12969   __pyx_t_2 = 0;
12970   goto __pyx_L0;
12971
12972   /* "lxml/objectify.pyx":777
12973  *         return _strValueOf(self) % other
12974  * 
12975  *     def __int__(self):             # <<<<<<<<<<<<<<
12976  *         return int(textOf(self._c_node))
12977  * 
12978  */
12979
12980   /* function exit code */
12981   __pyx_L1_error:;
12982   __Pyx_XDECREF(__pyx_t_1);
12983   __Pyx_XDECREF(__pyx_t_2);
12984   __Pyx_AddTraceback("lxml.objectify.StringElement.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12985   __pyx_r = NULL;
12986   __pyx_L0:;
12987   __Pyx_XGIVEREF(__pyx_r);
12988   __Pyx_RefNannyFinishContext();
12989   return __pyx_r;
12990 }
12991
12992 /* "lxml/objectify.pyx":780
12993  *         return int(textOf(self._c_node))
12994  * 
12995  *     def __long__(self):             # <<<<<<<<<<<<<<
12996  *         return long(textOf(self._c_node))
12997  * 
12998  */
12999
13000 /* Python wrapper */
13001 #if PY_MAJOR_VERSION < 3
13002 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_19__long__(PyObject *__pyx_v_self); /*proto*/
13003 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_19__long__(PyObject *__pyx_v_self) {
13004   PyObject *__pyx_r = 0;
13005   __Pyx_RefNannyDeclarations
13006   __Pyx_RefNannySetupContext("__long__ (wrapper)", 0);
13007   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_18__long__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
13008
13009   /* function exit code */
13010   __Pyx_RefNannyFinishContext();
13011   return __pyx_r;
13012 }
13013 #endif /*!(#if PY_MAJOR_VERSION < 3)*/
13014
13015 #if PY_MAJOR_VERSION < 3
13016 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_18__long__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
13017   PyObject *__pyx_r = NULL;
13018   __Pyx_RefNannyDeclarations
13019   PyObject *__pyx_t_1 = NULL;
13020   PyObject *__pyx_t_2 = NULL;
13021   int __pyx_lineno = 0;
13022   const char *__pyx_filename = NULL;
13023   int __pyx_clineno = 0;
13024   __Pyx_RefNannySetupContext("__long__", 0);
13025
13026   /* "lxml/objectify.pyx":781
13027  * 
13028  *     def __long__(self):
13029  *         return long(textOf(self._c_node))             # <<<<<<<<<<<<<<
13030  * 
13031  *     def __float__(self):
13032  */
13033   __Pyx_XDECREF(__pyx_r);
13034   __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)
13035   __Pyx_GOTREF(__pyx_t_1);
13036   __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyLong_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
13037   __Pyx_GOTREF(__pyx_t_2);
13038   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13039   __pyx_r = __pyx_t_2;
13040   __pyx_t_2 = 0;
13041   goto __pyx_L0;
13042
13043   /* "lxml/objectify.pyx":780
13044  *         return int(textOf(self._c_node))
13045  * 
13046  *     def __long__(self):             # <<<<<<<<<<<<<<
13047  *         return long(textOf(self._c_node))
13048  * 
13049  */
13050
13051   /* function exit code */
13052   __pyx_L1_error:;
13053   __Pyx_XDECREF(__pyx_t_1);
13054   __Pyx_XDECREF(__pyx_t_2);
13055   __Pyx_AddTraceback("lxml.objectify.StringElement.__long__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13056   __pyx_r = NULL;
13057   __pyx_L0:;
13058   __Pyx_XGIVEREF(__pyx_r);
13059   __Pyx_RefNannyFinishContext();
13060   return __pyx_r;
13061 }
13062 #endif /*!(#if PY_MAJOR_VERSION < 3)*/
13063
13064 /* "lxml/objectify.pyx":783
13065  *         return long(textOf(self._c_node))
13066  * 
13067  *     def __float__(self):             # <<<<<<<<<<<<<<
13068  *         return float(textOf(self._c_node))
13069  * 
13070  */
13071
13072 /* Python wrapper */
13073 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_21__float__(PyObject *__pyx_v_self); /*proto*/
13074 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_21__float__(PyObject *__pyx_v_self) {
13075   PyObject *__pyx_r = 0;
13076   __Pyx_RefNannyDeclarations
13077   __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
13078   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_20__float__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
13079
13080   /* function exit code */
13081   __Pyx_RefNannyFinishContext();
13082   return __pyx_r;
13083 }
13084
13085 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_20__float__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
13086   PyObject *__pyx_r = NULL;
13087   __Pyx_RefNannyDeclarations
13088   PyObject *__pyx_t_1 = NULL;
13089   PyObject *__pyx_t_2 = NULL;
13090   int __pyx_lineno = 0;
13091   const char *__pyx_filename = NULL;
13092   int __pyx_clineno = 0;
13093   __Pyx_RefNannySetupContext("__float__", 0);
13094
13095   /* "lxml/objectify.pyx":784
13096  * 
13097  *     def __float__(self):
13098  *         return float(textOf(self._c_node))             # <<<<<<<<<<<<<<
13099  * 
13100  *     def __complex__(self):
13101  */
13102   __Pyx_XDECREF(__pyx_r);
13103   __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)
13104   __Pyx_GOTREF(__pyx_t_1);
13105   __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error)
13106   __Pyx_GOTREF(__pyx_t_2);
13107   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13108   __pyx_r = __pyx_t_2;
13109   __pyx_t_2 = 0;
13110   goto __pyx_L0;
13111
13112   /* "lxml/objectify.pyx":783
13113  *         return long(textOf(self._c_node))
13114  * 
13115  *     def __float__(self):             # <<<<<<<<<<<<<<
13116  *         return float(textOf(self._c_node))
13117  * 
13118  */
13119
13120   /* function exit code */
13121   __pyx_L1_error:;
13122   __Pyx_XDECREF(__pyx_t_1);
13123   __Pyx_XDECREF(__pyx_t_2);
13124   __Pyx_AddTraceback("lxml.objectify.StringElement.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13125   __pyx_r = NULL;
13126   __pyx_L0:;
13127   __Pyx_XGIVEREF(__pyx_r);
13128   __Pyx_RefNannyFinishContext();
13129   return __pyx_r;
13130 }
13131
13132 /* "lxml/objectify.pyx":786
13133  *         return float(textOf(self._c_node))
13134  * 
13135  *     def __complex__(self):             # <<<<<<<<<<<<<<
13136  *         return complex(textOf(self._c_node))
13137  * 
13138  */
13139
13140 /* Python wrapper */
13141 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_23__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13142 static PyMethodDef __pyx_mdef_4lxml_9objectify_13StringElement_23__complex__ = {"__complex__", (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_23__complex__, METH_NOARGS, 0};
13143 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_23__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13144   PyObject *__pyx_r = 0;
13145   __Pyx_RefNannyDeclarations
13146   __Pyx_RefNannySetupContext("__complex__ (wrapper)", 0);
13147   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_22__complex__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
13148
13149   /* function exit code */
13150   __Pyx_RefNannyFinishContext();
13151   return __pyx_r;
13152 }
13153
13154 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_22__complex__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
13155   PyObject *__pyx_r = NULL;
13156   __Pyx_RefNannyDeclarations
13157   PyObject *__pyx_t_1 = NULL;
13158   PyObject *__pyx_t_2 = NULL;
13159   int __pyx_lineno = 0;
13160   const char *__pyx_filename = NULL;
13161   int __pyx_clineno = 0;
13162   __Pyx_RefNannySetupContext("__complex__", 0);
13163
13164   /* "lxml/objectify.pyx":787
13165  * 
13166  *     def __complex__(self):
13167  *         return complex(textOf(self._c_node))             # <<<<<<<<<<<<<<
13168  * 
13169  * cdef class NoneElement(ObjectifiedDataElement):
13170  */
13171   __Pyx_XDECREF(__pyx_r);
13172   __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)
13173   __Pyx_GOTREF(__pyx_t_1);
13174   __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyComplex_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
13175   __Pyx_GOTREF(__pyx_t_2);
13176   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13177   __pyx_r = __pyx_t_2;
13178   __pyx_t_2 = 0;
13179   goto __pyx_L0;
13180
13181   /* "lxml/objectify.pyx":786
13182  *         return float(textOf(self._c_node))
13183  * 
13184  *     def __complex__(self):             # <<<<<<<<<<<<<<
13185  *         return complex(textOf(self._c_node))
13186  * 
13187  */
13188
13189   /* function exit code */
13190   __pyx_L1_error:;
13191   __Pyx_XDECREF(__pyx_t_1);
13192   __Pyx_XDECREF(__pyx_t_2);
13193   __Pyx_AddTraceback("lxml.objectify.StringElement.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13194   __pyx_r = NULL;
13195   __pyx_L0:;
13196   __Pyx_XGIVEREF(__pyx_r);
13197   __Pyx_RefNannyFinishContext();
13198   return __pyx_r;
13199 }
13200
13201 /* "lxml/objectify.pyx":790
13202  * 
13203  * cdef class NoneElement(ObjectifiedDataElement):
13204  *     def __str__(self):             # <<<<<<<<<<<<<<
13205  *         return u"None"
13206  * 
13207  */
13208
13209 /* Python wrapper */
13210 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_1__str__(PyObject *__pyx_v_self); /*proto*/
13211 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_1__str__(PyObject *__pyx_v_self) {
13212   PyObject *__pyx_r = 0;
13213   __Pyx_RefNannyDeclarations
13214   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
13215   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement___str__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13216
13217   /* function exit code */
13218   __Pyx_RefNannyFinishContext();
13219   return __pyx_r;
13220 }
13221
13222 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13223   PyObject *__pyx_r = NULL;
13224   __Pyx_RefNannyDeclarations
13225   __Pyx_RefNannySetupContext("__str__", 0);
13226
13227   /* "lxml/objectify.pyx":791
13228  * cdef class NoneElement(ObjectifiedDataElement):
13229  *     def __str__(self):
13230  *         return u"None"             # <<<<<<<<<<<<<<
13231  * 
13232  *     def __repr__(self):
13233  */
13234   __Pyx_XDECREF(__pyx_r);
13235   __Pyx_INCREF(__pyx_n_u_None);
13236   __pyx_r = __pyx_n_u_None;
13237   goto __pyx_L0;
13238
13239   /* "lxml/objectify.pyx":790
13240  * 
13241  * cdef class NoneElement(ObjectifiedDataElement):
13242  *     def __str__(self):             # <<<<<<<<<<<<<<
13243  *         return u"None"
13244  * 
13245  */
13246
13247   /* function exit code */
13248   __pyx_L0:;
13249   __Pyx_XGIVEREF(__pyx_r);
13250   __Pyx_RefNannyFinishContext();
13251   return __pyx_r;
13252 }
13253
13254 /* "lxml/objectify.pyx":793
13255  *         return u"None"
13256  * 
13257  *     def __repr__(self):             # <<<<<<<<<<<<<<
13258  *         return "None"
13259  * 
13260  */
13261
13262 /* Python wrapper */
13263 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_3__repr__(PyObject *__pyx_v_self); /*proto*/
13264 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_3__repr__(PyObject *__pyx_v_self) {
13265   PyObject *__pyx_r = 0;
13266   __Pyx_RefNannyDeclarations
13267   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
13268   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_2__repr__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13269
13270   /* function exit code */
13271   __Pyx_RefNannyFinishContext();
13272   return __pyx_r;
13273 }
13274
13275 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_2__repr__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13276   PyObject *__pyx_r = NULL;
13277   __Pyx_RefNannyDeclarations
13278   __Pyx_RefNannySetupContext("__repr__", 0);
13279
13280   /* "lxml/objectify.pyx":794
13281  * 
13282  *     def __repr__(self):
13283  *         return "None"             # <<<<<<<<<<<<<<
13284  * 
13285  *     def __nonzero__(self):
13286  */
13287   __Pyx_XDECREF(__pyx_r);
13288   __Pyx_INCREF(__pyx_n_s_None);
13289   __pyx_r = __pyx_n_s_None;
13290   goto __pyx_L0;
13291
13292   /* "lxml/objectify.pyx":793
13293  *         return u"None"
13294  * 
13295  *     def __repr__(self):             # <<<<<<<<<<<<<<
13296  *         return "None"
13297  * 
13298  */
13299
13300   /* function exit code */
13301   __pyx_L0:;
13302   __Pyx_XGIVEREF(__pyx_r);
13303   __Pyx_RefNannyFinishContext();
13304   return __pyx_r;
13305 }
13306
13307 /* "lxml/objectify.pyx":796
13308  *         return "None"
13309  * 
13310  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
13311  *         return False
13312  * 
13313  */
13314
13315 /* Python wrapper */
13316 static int __pyx_pw_4lxml_9objectify_11NoneElement_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
13317 static int __pyx_pw_4lxml_9objectify_11NoneElement_5__nonzero__(PyObject *__pyx_v_self) {
13318   int __pyx_r;
13319   __Pyx_RefNannyDeclarations
13320   __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
13321   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_4__nonzero__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13322
13323   /* function exit code */
13324   __Pyx_RefNannyFinishContext();
13325   return __pyx_r;
13326 }
13327
13328 static int __pyx_pf_4lxml_9objectify_11NoneElement_4__nonzero__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13329   int __pyx_r;
13330   __Pyx_RefNannyDeclarations
13331   __Pyx_RefNannySetupContext("__nonzero__", 0);
13332
13333   /* "lxml/objectify.pyx":797
13334  * 
13335  *     def __nonzero__(self):
13336  *         return False             # <<<<<<<<<<<<<<
13337  * 
13338  *     def __richcmp__(self, other, int op):
13339  */
13340   __pyx_r = 0;
13341   goto __pyx_L0;
13342
13343   /* "lxml/objectify.pyx":796
13344  *         return "None"
13345  * 
13346  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
13347  *         return False
13348  * 
13349  */
13350
13351   /* function exit code */
13352   __pyx_L0:;
13353   __Pyx_RefNannyFinishContext();
13354   return __pyx_r;
13355 }
13356
13357 /* "lxml/objectify.pyx":799
13358  *         return False
13359  * 
13360  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
13361  *         if other is None or self is None:
13362  *             return python.PyObject_RichCompare(None, None, op)
13363  */
13364
13365 /* Python wrapper */
13366 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
13367 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
13368   PyObject *__pyx_r = 0;
13369   __Pyx_RefNannyDeclarations
13370   __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
13371   __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));
13372
13373   /* function exit code */
13374   __Pyx_RefNannyFinishContext();
13375   return __pyx_r;
13376 }
13377
13378 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) {
13379   PyObject *__pyx_r = NULL;
13380   __Pyx_RefNannyDeclarations
13381   int __pyx_t_1;
13382   int __pyx_t_2;
13383   int __pyx_t_3;
13384   PyObject *__pyx_t_4 = NULL;
13385   int __pyx_lineno = 0;
13386   const char *__pyx_filename = NULL;
13387   int __pyx_clineno = 0;
13388   __Pyx_RefNannySetupContext("__richcmp__", 0);
13389
13390   /* "lxml/objectify.pyx":800
13391  * 
13392  *     def __richcmp__(self, other, int op):
13393  *         if other is None or self is None:             # <<<<<<<<<<<<<<
13394  *             return python.PyObject_RichCompare(None, None, op)
13395  *         if isinstance(self, NoneElement):
13396  */
13397   __pyx_t_2 = (__pyx_v_other == Py_None);
13398   __pyx_t_3 = (__pyx_t_2 != 0);
13399   if (!__pyx_t_3) {
13400   } else {
13401     __pyx_t_1 = __pyx_t_3;
13402     goto __pyx_L4_bool_binop_done;
13403   }
13404   __pyx_t_3 = (((PyObject *)__pyx_v_self) == Py_None);
13405   __pyx_t_2 = (__pyx_t_3 != 0);
13406   __pyx_t_1 = __pyx_t_2;
13407   __pyx_L4_bool_binop_done:;
13408   if (__pyx_t_1) {
13409
13410     /* "lxml/objectify.pyx":801
13411  *     def __richcmp__(self, other, int op):
13412  *         if other is None or self is None:
13413  *             return python.PyObject_RichCompare(None, None, op)             # <<<<<<<<<<<<<<
13414  *         if isinstance(self, NoneElement):
13415  *             return python.PyObject_RichCompare(None, other, op)
13416  */
13417     __Pyx_XDECREF(__pyx_r);
13418     __pyx_t_4 = PyObject_RichCompare(Py_None, Py_None, __pyx_v_op); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 801, __pyx_L1_error)
13419     __Pyx_GOTREF(__pyx_t_4);
13420     __pyx_r = __pyx_t_4;
13421     __pyx_t_4 = 0;
13422     goto __pyx_L0;
13423
13424     /* "lxml/objectify.pyx":800
13425  * 
13426  *     def __richcmp__(self, other, int op):
13427  *         if other is None or self is None:             # <<<<<<<<<<<<<<
13428  *             return python.PyObject_RichCompare(None, None, op)
13429  *         if isinstance(self, NoneElement):
13430  */
13431   }
13432
13433   /* "lxml/objectify.pyx":802
13434  *         if other is None or self is None:
13435  *             return python.PyObject_RichCompare(None, None, op)
13436  *         if isinstance(self, NoneElement):             # <<<<<<<<<<<<<<
13437  *             return python.PyObject_RichCompare(None, other, op)
13438  *         else:
13439  */
13440   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_4lxml_9objectify_NoneElement); 
13441   __pyx_t_2 = (__pyx_t_1 != 0);
13442   if (__pyx_t_2) {
13443
13444     /* "lxml/objectify.pyx":803
13445  *             return python.PyObject_RichCompare(None, None, op)
13446  *         if isinstance(self, NoneElement):
13447  *             return python.PyObject_RichCompare(None, other, op)             # <<<<<<<<<<<<<<
13448  *         else:
13449  *             return python.PyObject_RichCompare(self, None, op)
13450  */
13451     __Pyx_XDECREF(__pyx_r);
13452     __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)
13453     __Pyx_GOTREF(__pyx_t_4);
13454     __pyx_r = __pyx_t_4;
13455     __pyx_t_4 = 0;
13456     goto __pyx_L0;
13457
13458     /* "lxml/objectify.pyx":802
13459  *         if other is None or self is None:
13460  *             return python.PyObject_RichCompare(None, None, op)
13461  *         if isinstance(self, NoneElement):             # <<<<<<<<<<<<<<
13462  *             return python.PyObject_RichCompare(None, other, op)
13463  *         else:
13464  */
13465   }
13466
13467   /* "lxml/objectify.pyx":805
13468  *             return python.PyObject_RichCompare(None, other, op)
13469  *         else:
13470  *             return python.PyObject_RichCompare(self, None, op)             # <<<<<<<<<<<<<<
13471  * 
13472  *     def __hash__(self):
13473  */
13474   /*else*/ {
13475     __Pyx_XDECREF(__pyx_r);
13476     __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)
13477     __Pyx_GOTREF(__pyx_t_4);
13478     __pyx_r = __pyx_t_4;
13479     __pyx_t_4 = 0;
13480     goto __pyx_L0;
13481   }
13482
13483   /* "lxml/objectify.pyx":799
13484  *         return False
13485  * 
13486  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
13487  *         if other is None or self is None:
13488  *             return python.PyObject_RichCompare(None, None, op)
13489  */
13490
13491   /* function exit code */
13492   __pyx_L1_error:;
13493   __Pyx_XDECREF(__pyx_t_4);
13494   __Pyx_AddTraceback("lxml.objectify.NoneElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13495   __pyx_r = NULL;
13496   __pyx_L0:;
13497   __Pyx_XGIVEREF(__pyx_r);
13498   __Pyx_RefNannyFinishContext();
13499   return __pyx_r;
13500 }
13501
13502 /* "lxml/objectify.pyx":807
13503  *             return python.PyObject_RichCompare(self, None, op)
13504  * 
13505  *     def __hash__(self):             # <<<<<<<<<<<<<<
13506  *         return hash(None)
13507  * 
13508  */
13509
13510 /* Python wrapper */
13511 static Py_hash_t __pyx_pw_4lxml_9objectify_11NoneElement_9__hash__(PyObject *__pyx_v_self); /*proto*/
13512 static Py_hash_t __pyx_pw_4lxml_9objectify_11NoneElement_9__hash__(PyObject *__pyx_v_self) {
13513   Py_hash_t __pyx_r;
13514   __Pyx_RefNannyDeclarations
13515   __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
13516   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13517
13518   /* function exit code */
13519   __Pyx_RefNannyFinishContext();
13520   return __pyx_r;
13521 }
13522
13523 static Py_hash_t __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13524   Py_hash_t __pyx_r;
13525   __Pyx_RefNannyDeclarations
13526   Py_hash_t __pyx_t_1;
13527   int __pyx_lineno = 0;
13528   const char *__pyx_filename = NULL;
13529   int __pyx_clineno = 0;
13530   __Pyx_RefNannySetupContext("__hash__", 0);
13531
13532   /* "lxml/objectify.pyx":808
13533  * 
13534  *     def __hash__(self):
13535  *         return hash(None)             # <<<<<<<<<<<<<<
13536  * 
13537  *     @property
13538  */
13539   __pyx_t_1 = PyObject_Hash(Py_None); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 808, __pyx_L1_error)
13540   __pyx_r = __pyx_t_1;
13541   goto __pyx_L0;
13542
13543   /* "lxml/objectify.pyx":807
13544  *             return python.PyObject_RichCompare(self, None, op)
13545  * 
13546  *     def __hash__(self):             # <<<<<<<<<<<<<<
13547  *         return hash(None)
13548  * 
13549  */
13550
13551   /* function exit code */
13552   __pyx_L1_error:;
13553   __Pyx_AddTraceback("lxml.objectify.NoneElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13554   __pyx_r = -1;
13555   __pyx_L0:;
13556   if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
13557   __Pyx_RefNannyFinishContext();
13558   return __pyx_r;
13559 }
13560
13561 /* "lxml/objectify.pyx":811
13562  * 
13563  *     @property
13564  *     def pyval(self):             # <<<<<<<<<<<<<<
13565  *         return None
13566  * 
13567  */
13568
13569 /* Python wrapper */
13570 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
13571 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_5pyval_1__get__(PyObject *__pyx_v_self) {
13572   PyObject *__pyx_r = 0;
13573   __Pyx_RefNannyDeclarations
13574   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13575   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13576
13577   /* function exit code */
13578   __Pyx_RefNannyFinishContext();
13579   return __pyx_r;
13580 }
13581
13582 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13583   PyObject *__pyx_r = NULL;
13584   __Pyx_RefNannyDeclarations
13585   __Pyx_RefNannySetupContext("__get__", 0);
13586
13587   /* "lxml/objectify.pyx":812
13588  *     @property
13589  *     def pyval(self):
13590  *         return None             # <<<<<<<<<<<<<<
13591  * 
13592  * 
13593  */
13594   __Pyx_XDECREF(__pyx_r);
13595   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13596   goto __pyx_L0;
13597
13598   /* "lxml/objectify.pyx":811
13599  * 
13600  *     @property
13601  *     def pyval(self):             # <<<<<<<<<<<<<<
13602  *         return None
13603  * 
13604  */
13605
13606   /* function exit code */
13607   __pyx_L0:;
13608   __Pyx_XGIVEREF(__pyx_r);
13609   __Pyx_RefNannyFinishContext();
13610   return __pyx_r;
13611 }
13612
13613 /* "lxml/objectify.pyx":821
13614  *     Python's bool type.
13615  *     """
13616  *     def _init(self):             # <<<<<<<<<<<<<<
13617  *         self._parse_value = __parseBool
13618  * 
13619  */
13620
13621 /* Python wrapper */
13622 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13623 static PyMethodDef __pyx_mdef_4lxml_9objectify_11BoolElement_1_init = {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_11BoolElement_1_init, METH_NOARGS, 0};
13624 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13625   PyObject *__pyx_r = 0;
13626   __Pyx_RefNannyDeclarations
13627   __Pyx_RefNannySetupContext("_init (wrapper)", 0);
13628   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement__init(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13629
13630   /* function exit code */
13631   __Pyx_RefNannyFinishContext();
13632   return __pyx_r;
13633 }
13634
13635 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13636   PyObject *__pyx_r = NULL;
13637   __Pyx_RefNannyDeclarations
13638   PyObject *__pyx_t_1 = NULL;
13639   int __pyx_lineno = 0;
13640   const char *__pyx_filename = NULL;
13641   int __pyx_clineno = 0;
13642   __Pyx_RefNannySetupContext("_init", 0);
13643
13644   /* "lxml/objectify.pyx":822
13645  *     """
13646  *     def _init(self):
13647  *         self._parse_value = __parseBool             # <<<<<<<<<<<<<<
13648  * 
13649  *     def __nonzero__(self):
13650  */
13651   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_parseBool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error)
13652   __Pyx_GOTREF(__pyx_t_1);
13653   __Pyx_GIVEREF(__pyx_t_1);
13654   __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._parse_value);
13655   __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base._parse_value);
13656   __pyx_v_self->__pyx_base.__pyx_base._parse_value = __pyx_t_1;
13657   __pyx_t_1 = 0;
13658
13659   /* "lxml/objectify.pyx":821
13660  *     Python's bool type.
13661  *     """
13662  *     def _init(self):             # <<<<<<<<<<<<<<
13663  *         self._parse_value = __parseBool
13664  * 
13665  */
13666
13667   /* function exit code */
13668   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13669   goto __pyx_L0;
13670   __pyx_L1_error:;
13671   __Pyx_XDECREF(__pyx_t_1);
13672   __Pyx_AddTraceback("lxml.objectify.BoolElement._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
13673   __pyx_r = NULL;
13674   __pyx_L0:;
13675   __Pyx_XGIVEREF(__pyx_r);
13676   __Pyx_RefNannyFinishContext();
13677   return __pyx_r;
13678 }
13679
13680 /* "lxml/objectify.pyx":824
13681  *         self._parse_value = __parseBool
13682  * 
13683  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
13684  *         return __parseBool(textOf(self._c_node))
13685  * 
13686  */
13687
13688 /* Python wrapper */
13689 static int __pyx_pw_4lxml_9objectify_11BoolElement_3__nonzero__(PyObject *__pyx_v_self); /*proto*/
13690 static int __pyx_pw_4lxml_9objectify_11BoolElement_3__nonzero__(PyObject *__pyx_v_self) {
13691   int __pyx_r;
13692   __Pyx_RefNannyDeclarations
13693   __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
13694   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13695
13696   /* function exit code */
13697   __Pyx_RefNannyFinishContext();
13698   return __pyx_r;
13699 }
13700
13701 static int __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13702   int __pyx_r;
13703   __Pyx_RefNannyDeclarations
13704   PyObject *__pyx_t_1 = NULL;
13705   int __pyx_t_2;
13706   int __pyx_lineno = 0;
13707   const char *__pyx_filename = NULL;
13708   int __pyx_clineno = 0;
13709   __Pyx_RefNannySetupContext("__nonzero__", 0);
13710
13711   /* "lxml/objectify.pyx":825
13712  * 
13713  *     def __nonzero__(self):
13714  *         return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
13715  * 
13716  *     def __richcmp__(self, other, int op):
13717  */
13718   __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)
13719   __Pyx_GOTREF(__pyx_t_1);
13720   __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)
13721   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13722   __pyx_r = __pyx_t_2;
13723   goto __pyx_L0;
13724
13725   /* "lxml/objectify.pyx":824
13726  *         self._parse_value = __parseBool
13727  * 
13728  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
13729  *         return __parseBool(textOf(self._c_node))
13730  * 
13731  */
13732
13733   /* function exit code */
13734   __pyx_L1_error:;
13735   __Pyx_XDECREF(__pyx_t_1);
13736   __Pyx_AddTraceback("lxml.objectify.BoolElement.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13737   __pyx_r = -1;
13738   __pyx_L0:;
13739   __Pyx_RefNannyFinishContext();
13740   return __pyx_r;
13741 }
13742
13743 /* "lxml/objectify.pyx":827
13744  *         return __parseBool(textOf(self._c_node))
13745  * 
13746  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
13747  *         return _richcmpPyvals(self, other, op)
13748  * 
13749  */
13750
13751 /* Python wrapper */
13752 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
13753 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
13754   PyObject *__pyx_r = 0;
13755   __Pyx_RefNannyDeclarations
13756   __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
13757   __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));
13758
13759   /* function exit code */
13760   __Pyx_RefNannyFinishContext();
13761   return __pyx_r;
13762 }
13763
13764 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) {
13765   PyObject *__pyx_r = NULL;
13766   __Pyx_RefNannyDeclarations
13767   PyObject *__pyx_t_1 = NULL;
13768   int __pyx_lineno = 0;
13769   const char *__pyx_filename = NULL;
13770   int __pyx_clineno = 0;
13771   __Pyx_RefNannySetupContext("__richcmp__", 0);
13772
13773   /* "lxml/objectify.pyx":828
13774  * 
13775  *     def __richcmp__(self, other, int op):
13776  *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
13777  * 
13778  *     def __hash__(self):
13779  */
13780   __Pyx_XDECREF(__pyx_r);
13781   __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)
13782   __Pyx_GOTREF(__pyx_t_1);
13783   __pyx_r = __pyx_t_1;
13784   __pyx_t_1 = 0;
13785   goto __pyx_L0;
13786
13787   /* "lxml/objectify.pyx":827
13788  *         return __parseBool(textOf(self._c_node))
13789  * 
13790  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
13791  *         return _richcmpPyvals(self, other, op)
13792  * 
13793  */
13794
13795   /* function exit code */
13796   __pyx_L1_error:;
13797   __Pyx_XDECREF(__pyx_t_1);
13798   __Pyx_AddTraceback("lxml.objectify.BoolElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13799   __pyx_r = NULL;
13800   __pyx_L0:;
13801   __Pyx_XGIVEREF(__pyx_r);
13802   __Pyx_RefNannyFinishContext();
13803   return __pyx_r;
13804 }
13805
13806 /* "lxml/objectify.pyx":830
13807  *         return _richcmpPyvals(self, other, op)
13808  * 
13809  *     def __hash__(self):             # <<<<<<<<<<<<<<
13810  *         return hash(__parseBool(textOf(self._c_node)))
13811  * 
13812  */
13813
13814 /* Python wrapper */
13815 static Py_hash_t __pyx_pw_4lxml_9objectify_11BoolElement_7__hash__(PyObject *__pyx_v_self); /*proto*/
13816 static Py_hash_t __pyx_pw_4lxml_9objectify_11BoolElement_7__hash__(PyObject *__pyx_v_self) {
13817   Py_hash_t __pyx_r;
13818   __Pyx_RefNannyDeclarations
13819   __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
13820   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13821
13822   /* function exit code */
13823   __Pyx_RefNannyFinishContext();
13824   return __pyx_r;
13825 }
13826
13827 static Py_hash_t __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13828   Py_hash_t __pyx_r;
13829   __Pyx_RefNannyDeclarations
13830   PyObject *__pyx_t_1 = NULL;
13831   int __pyx_t_2;
13832   Py_hash_t __pyx_t_3;
13833   int __pyx_lineno = 0;
13834   const char *__pyx_filename = NULL;
13835   int __pyx_clineno = 0;
13836   __Pyx_RefNannySetupContext("__hash__", 0);
13837
13838   /* "lxml/objectify.pyx":831
13839  * 
13840  *     def __hash__(self):
13841  *         return hash(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
13842  * 
13843  *     def __str__(self):
13844  */
13845   __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)
13846   __Pyx_GOTREF(__pyx_t_1);
13847   __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)
13848   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13849   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error)
13850   __Pyx_GOTREF(__pyx_t_1);
13851   __pyx_t_3 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_hash_t)-1))) __PYX_ERR(0, 831, __pyx_L1_error)
13852   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13853   __pyx_r = __pyx_t_3;
13854   goto __pyx_L0;
13855
13856   /* "lxml/objectify.pyx":830
13857  *         return _richcmpPyvals(self, other, op)
13858  * 
13859  *     def __hash__(self):             # <<<<<<<<<<<<<<
13860  *         return hash(__parseBool(textOf(self._c_node)))
13861  * 
13862  */
13863
13864   /* function exit code */
13865   __pyx_L1_error:;
13866   __Pyx_XDECREF(__pyx_t_1);
13867   __Pyx_AddTraceback("lxml.objectify.BoolElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13868   __pyx_r = -1;
13869   __pyx_L0:;
13870   if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
13871   __Pyx_RefNannyFinishContext();
13872   return __pyx_r;
13873 }
13874
13875 /* "lxml/objectify.pyx":833
13876  *         return hash(__parseBool(textOf(self._c_node)))
13877  * 
13878  *     def __str__(self):             # <<<<<<<<<<<<<<
13879  *         return unicode(__parseBool(textOf(self._c_node)))
13880  * 
13881  */
13882
13883 /* Python wrapper */
13884 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_9__str__(PyObject *__pyx_v_self); /*proto*/
13885 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_9__str__(PyObject *__pyx_v_self) {
13886   PyObject *__pyx_r = 0;
13887   __Pyx_RefNannyDeclarations
13888   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
13889   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_8__str__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13890
13891   /* function exit code */
13892   __Pyx_RefNannyFinishContext();
13893   return __pyx_r;
13894 }
13895
13896 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_8__str__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13897   PyObject *__pyx_r = NULL;
13898   __Pyx_RefNannyDeclarations
13899   PyObject *__pyx_t_1 = NULL;
13900   int __pyx_t_2;
13901   PyObject *__pyx_t_3 = NULL;
13902   int __pyx_lineno = 0;
13903   const char *__pyx_filename = NULL;
13904   int __pyx_clineno = 0;
13905   __Pyx_RefNannySetupContext("__str__", 0);
13906
13907   /* "lxml/objectify.pyx":834
13908  * 
13909  *     def __str__(self):
13910  *         return unicode(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
13911  * 
13912  *     def __repr__(self):
13913  */
13914   __Pyx_XDECREF(__pyx_r);
13915   __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)
13916   __Pyx_GOTREF(__pyx_t_1);
13917   __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)
13918   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13919   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
13920   __Pyx_GOTREF(__pyx_t_1);
13921   __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
13922   __Pyx_GOTREF(__pyx_t_3);
13923   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13924   __pyx_r = __pyx_t_3;
13925   __pyx_t_3 = 0;
13926   goto __pyx_L0;
13927
13928   /* "lxml/objectify.pyx":833
13929  *         return hash(__parseBool(textOf(self._c_node)))
13930  * 
13931  *     def __str__(self):             # <<<<<<<<<<<<<<
13932  *         return unicode(__parseBool(textOf(self._c_node)))
13933  * 
13934  */
13935
13936   /* function exit code */
13937   __pyx_L1_error:;
13938   __Pyx_XDECREF(__pyx_t_1);
13939   __Pyx_XDECREF(__pyx_t_3);
13940   __Pyx_AddTraceback("lxml.objectify.BoolElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13941   __pyx_r = NULL;
13942   __pyx_L0:;
13943   __Pyx_XGIVEREF(__pyx_r);
13944   __Pyx_RefNannyFinishContext();
13945   return __pyx_r;
13946 }
13947
13948 /* "lxml/objectify.pyx":836
13949  *         return unicode(__parseBool(textOf(self._c_node)))
13950  * 
13951  *     def __repr__(self):             # <<<<<<<<<<<<<<
13952  *         return repr(__parseBool(textOf(self._c_node)))
13953  * 
13954  */
13955
13956 /* Python wrapper */
13957 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_11__repr__(PyObject *__pyx_v_self); /*proto*/
13958 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_11__repr__(PyObject *__pyx_v_self) {
13959   PyObject *__pyx_r = 0;
13960   __Pyx_RefNannyDeclarations
13961   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
13962   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13963
13964   /* function exit code */
13965   __Pyx_RefNannyFinishContext();
13966   return __pyx_r;
13967 }
13968
13969 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13970   PyObject *__pyx_r = NULL;
13971   __Pyx_RefNannyDeclarations
13972   PyObject *__pyx_t_1 = NULL;
13973   int __pyx_t_2;
13974   PyObject *__pyx_t_3 = NULL;
13975   int __pyx_lineno = 0;
13976   const char *__pyx_filename = NULL;
13977   int __pyx_clineno = 0;
13978   __Pyx_RefNannySetupContext("__repr__", 0);
13979
13980   /* "lxml/objectify.pyx":837
13981  * 
13982  *     def __repr__(self):
13983  *         return repr(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
13984  * 
13985  *     @property
13986  */
13987   __Pyx_XDECREF(__pyx_r);
13988   __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)
13989   __Pyx_GOTREF(__pyx_t_1);
13990   __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)
13991   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13992   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
13993   __Pyx_GOTREF(__pyx_t_1);
13994   __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
13995   __Pyx_GOTREF(__pyx_t_3);
13996   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13997   __pyx_r = __pyx_t_3;
13998   __pyx_t_3 = 0;
13999   goto __pyx_L0;
14000
14001   /* "lxml/objectify.pyx":836
14002  *         return unicode(__parseBool(textOf(self._c_node)))
14003  * 
14004  *     def __repr__(self):             # <<<<<<<<<<<<<<
14005  *         return repr(__parseBool(textOf(self._c_node)))
14006  * 
14007  */
14008
14009   /* function exit code */
14010   __pyx_L1_error:;
14011   __Pyx_XDECREF(__pyx_t_1);
14012   __Pyx_XDECREF(__pyx_t_3);
14013   __Pyx_AddTraceback("lxml.objectify.BoolElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14014   __pyx_r = NULL;
14015   __pyx_L0:;
14016   __Pyx_XGIVEREF(__pyx_r);
14017   __Pyx_RefNannyFinishContext();
14018   return __pyx_r;
14019 }
14020
14021 /* "lxml/objectify.pyx":840
14022  * 
14023  *     @property
14024  *     def pyval(self):             # <<<<<<<<<<<<<<
14025  *         return __parseBool(textOf(self._c_node))
14026  * 
14027  */
14028
14029 /* Python wrapper */
14030 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
14031 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5pyval_1__get__(PyObject *__pyx_v_self) {
14032   PyObject *__pyx_r = 0;
14033   __Pyx_RefNannyDeclarations
14034   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14035   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
14036
14037   /* function exit code */
14038   __Pyx_RefNannyFinishContext();
14039   return __pyx_r;
14040 }
14041
14042 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
14043   PyObject *__pyx_r = NULL;
14044   __Pyx_RefNannyDeclarations
14045   PyObject *__pyx_t_1 = NULL;
14046   int __pyx_t_2;
14047   int __pyx_lineno = 0;
14048   const char *__pyx_filename = NULL;
14049   int __pyx_clineno = 0;
14050   __Pyx_RefNannySetupContext("__get__", 0);
14051
14052   /* "lxml/objectify.pyx":841
14053  *     @property
14054  *     def pyval(self):
14055  *         return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
14056  * 
14057  * def __checkBool(s):
14058  */
14059   __Pyx_XDECREF(__pyx_r);
14060   __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)
14061   __Pyx_GOTREF(__pyx_t_1);
14062   __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)
14063   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14064   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
14065   __Pyx_GOTREF(__pyx_t_1);
14066   __pyx_r = __pyx_t_1;
14067   __pyx_t_1 = 0;
14068   goto __pyx_L0;
14069
14070   /* "lxml/objectify.pyx":840
14071  * 
14072  *     @property
14073  *     def pyval(self):             # <<<<<<<<<<<<<<
14074  *         return __parseBool(textOf(self._c_node))
14075  * 
14076  */
14077
14078   /* function exit code */
14079   __pyx_L1_error:;
14080   __Pyx_XDECREF(__pyx_t_1);
14081   __Pyx_AddTraceback("lxml.objectify.BoolElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14082   __pyx_r = NULL;
14083   __pyx_L0:;
14084   __Pyx_XGIVEREF(__pyx_r);
14085   __Pyx_RefNannyFinishContext();
14086   return __pyx_r;
14087 }
14088
14089 /* "lxml/objectify.pyx":843
14090  *         return __parseBool(textOf(self._c_node))
14091  * 
14092  * def __checkBool(s):             # <<<<<<<<<<<<<<
14093  *     cdef int value = -1
14094  *     if s is not None:
14095  */
14096
14097 /* Python wrapper */
14098 static PyObject *__pyx_pw_4lxml_9objectify_3__checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
14099 static PyMethodDef __pyx_mdef_4lxml_9objectify_3__checkBool = {"__checkBool", (PyCFunction)__pyx_pw_4lxml_9objectify_3__checkBool, METH_O, 0};
14100 static PyObject *__pyx_pw_4lxml_9objectify_3__checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
14101   PyObject *__pyx_r = 0;
14102   __Pyx_RefNannyDeclarations
14103   __Pyx_RefNannySetupContext("__checkBool (wrapper)", 0);
14104   __pyx_r = __pyx_pf_4lxml_9objectify_2__checkBool(__pyx_self, ((PyObject *)__pyx_v_s));
14105
14106   /* function exit code */
14107   __Pyx_RefNannyFinishContext();
14108   return __pyx_r;
14109 }
14110
14111 static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
14112   int __pyx_v_value;
14113   PyObject *__pyx_r = NULL;
14114   __Pyx_RefNannyDeclarations
14115   int __pyx_t_1;
14116   int __pyx_t_2;
14117   int __pyx_t_3;
14118   int __pyx_lineno = 0;
14119   const char *__pyx_filename = NULL;
14120   int __pyx_clineno = 0;
14121   __Pyx_RefNannySetupContext("__checkBool", 0);
14122
14123   /* "lxml/objectify.pyx":844
14124  * 
14125  * def __checkBool(s):
14126  *     cdef int value = -1             # <<<<<<<<<<<<<<
14127  *     if s is not None:
14128  *         value = __parseBoolAsInt(s)
14129  */
14130   __pyx_v_value = -1;
14131
14132   /* "lxml/objectify.pyx":845
14133  * def __checkBool(s):
14134  *     cdef int value = -1
14135  *     if s is not None:             # <<<<<<<<<<<<<<
14136  *         value = __parseBoolAsInt(s)
14137  *     if value == -1:
14138  */
14139   __pyx_t_1 = (__pyx_v_s != Py_None);
14140   __pyx_t_2 = (__pyx_t_1 != 0);
14141   if (__pyx_t_2) {
14142
14143     /* "lxml/objectify.pyx":846
14144  *     cdef int value = -1
14145  *     if s is not None:
14146  *         value = __parseBoolAsInt(s)             # <<<<<<<<<<<<<<
14147  *     if value == -1:
14148  *         raise ValueError
14149  */
14150     __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)
14151     __pyx_v_value = __pyx_t_3;
14152
14153     /* "lxml/objectify.pyx":845
14154  * def __checkBool(s):
14155  *     cdef int value = -1
14156  *     if s is not None:             # <<<<<<<<<<<<<<
14157  *         value = __parseBoolAsInt(s)
14158  *     if value == -1:
14159  */
14160   }
14161
14162   /* "lxml/objectify.pyx":847
14163  *     if s is not None:
14164  *         value = __parseBoolAsInt(s)
14165  *     if value == -1:             # <<<<<<<<<<<<<<
14166  *         raise ValueError
14167  * 
14168  */
14169   __pyx_t_2 = ((__pyx_v_value == -1L) != 0);
14170   if (unlikely(__pyx_t_2)) {
14171
14172     /* "lxml/objectify.pyx":848
14173  *         value = __parseBoolAsInt(s)
14174  *     if value == -1:
14175  *         raise ValueError             # <<<<<<<<<<<<<<
14176  * 
14177  * cpdef bint __parseBool(s) except -1:
14178  */
14179     __Pyx_Raise(__pyx_builtin_ValueError, 0, 0, 0);
14180     __PYX_ERR(0, 848, __pyx_L1_error)
14181
14182     /* "lxml/objectify.pyx":847
14183  *     if s is not None:
14184  *         value = __parseBoolAsInt(s)
14185  *     if value == -1:             # <<<<<<<<<<<<<<
14186  *         raise ValueError
14187  * 
14188  */
14189   }
14190
14191   /* "lxml/objectify.pyx":843
14192  *         return __parseBool(textOf(self._c_node))
14193  * 
14194  * def __checkBool(s):             # <<<<<<<<<<<<<<
14195  *     cdef int value = -1
14196  *     if s is not None:
14197  */
14198
14199   /* function exit code */
14200   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14201   goto __pyx_L0;
14202   __pyx_L1_error:;
14203   __Pyx_AddTraceback("lxml.objectify.__checkBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
14204   __pyx_r = NULL;
14205   __pyx_L0:;
14206   __Pyx_XGIVEREF(__pyx_r);
14207   __Pyx_RefNannyFinishContext();
14208   return __pyx_r;
14209 }
14210
14211 /* "lxml/objectify.pyx":850
14212  *         raise ValueError
14213  * 
14214  * cpdef bint __parseBool(s) except -1:             # <<<<<<<<<<<<<<
14215  *     cdef int value
14216  *     if s is None:
14217  */
14218
14219 static PyObject *__pyx_pw_4lxml_9objectify_5__parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
14220 static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUSED int __pyx_skip_dispatch) {
14221   int __pyx_v_value;
14222   int __pyx_r;
14223   __Pyx_RefNannyDeclarations
14224   int __pyx_t_1;
14225   int __pyx_t_2;
14226   int __pyx_t_3;
14227   PyObject *__pyx_t_4 = NULL;
14228   Py_ssize_t __pyx_t_5;
14229   Py_UCS4 __pyx_t_6;
14230   PyObject *__pyx_t_7 = NULL;
14231   int __pyx_lineno = 0;
14232   const char *__pyx_filename = NULL;
14233   int __pyx_clineno = 0;
14234   __Pyx_RefNannySetupContext("__parseBool", 0);
14235
14236   /* "lxml/objectify.pyx":852
14237  * cpdef bint __parseBool(s) except -1:
14238  *     cdef int value
14239  *     if s is None:             # <<<<<<<<<<<<<<
14240  *         return False
14241  *     value = __parseBoolAsInt(s)
14242  */
14243   __pyx_t_1 = (__pyx_v_s == Py_None);
14244   __pyx_t_2 = (__pyx_t_1 != 0);
14245   if (__pyx_t_2) {
14246
14247     /* "lxml/objectify.pyx":853
14248  *     cdef int value
14249  *     if s is None:
14250  *         return False             # <<<<<<<<<<<<<<
14251  *     value = __parseBoolAsInt(s)
14252  *     if value == -1:
14253  */
14254     __pyx_r = 0;
14255     goto __pyx_L0;
14256
14257     /* "lxml/objectify.pyx":852
14258  * cpdef bint __parseBool(s) except -1:
14259  *     cdef int value
14260  *     if s is None:             # <<<<<<<<<<<<<<
14261  *         return False
14262  *     value = __parseBoolAsInt(s)
14263  */
14264   }
14265
14266   /* "lxml/objectify.pyx":854
14267  *     if s is None:
14268  *         return False
14269  *     value = __parseBoolAsInt(s)             # <<<<<<<<<<<<<<
14270  *     if value == -1:
14271  *         raise ValueError, f"Invalid boolean value: '{s}'"
14272  */
14273   __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)
14274   __pyx_v_value = __pyx_t_3;
14275
14276   /* "lxml/objectify.pyx":855
14277  *         return False
14278  *     value = __parseBoolAsInt(s)
14279  *     if value == -1:             # <<<<<<<<<<<<<<
14280  *         raise ValueError, f"Invalid boolean value: '{s}'"
14281  *     return value
14282  */
14283   __pyx_t_2 = ((__pyx_v_value == -1L) != 0);
14284   if (unlikely(__pyx_t_2)) {
14285
14286     /* "lxml/objectify.pyx":856
14287  *     value = __parseBoolAsInt(s)
14288  *     if value == -1:
14289  *         raise ValueError, f"Invalid boolean value: '{s}'"             # <<<<<<<<<<<<<<
14290  *     return value
14291  * 
14292  */
14293     __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error)
14294     __Pyx_GOTREF(__pyx_t_4);
14295     __pyx_t_5 = 0;
14296     __pyx_t_6 = 127;
14297     __Pyx_INCREF(__pyx_kp_u_Invalid_boolean_value);
14298     __pyx_t_5 += 24;
14299     __Pyx_GIVEREF(__pyx_kp_u_Invalid_boolean_value);
14300     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Invalid_boolean_value);
14301     __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_s, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 856, __pyx_L1_error)
14302     __Pyx_GOTREF(__pyx_t_7);
14303     __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;
14304     __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
14305     __Pyx_GIVEREF(__pyx_t_7);
14306     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
14307     __pyx_t_7 = 0;
14308     __Pyx_INCREF(__pyx_kp_u__4);
14309     __pyx_t_5 += 1;
14310     __Pyx_GIVEREF(__pyx_kp_u__4);
14311     PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__4);
14312     __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)
14313     __Pyx_GOTREF(__pyx_t_7);
14314     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14315     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_7, 0, 0);
14316     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14317     __PYX_ERR(0, 856, __pyx_L1_error)
14318
14319     /* "lxml/objectify.pyx":855
14320  *         return False
14321  *     value = __parseBoolAsInt(s)
14322  *     if value == -1:             # <<<<<<<<<<<<<<
14323  *         raise ValueError, f"Invalid boolean value: '{s}'"
14324  *     return value
14325  */
14326   }
14327
14328   /* "lxml/objectify.pyx":857
14329  *     if value == -1:
14330  *         raise ValueError, f"Invalid boolean value: '{s}'"
14331  *     return value             # <<<<<<<<<<<<<<
14332  * 
14333  * cdef inline int __parseBoolAsInt(text) except -2:
14334  */
14335   __pyx_r = __pyx_v_value;
14336   goto __pyx_L0;
14337
14338   /* "lxml/objectify.pyx":850
14339  *         raise ValueError
14340  * 
14341  * cpdef bint __parseBool(s) except -1:             # <<<<<<<<<<<<<<
14342  *     cdef int value
14343  *     if s is None:
14344  */
14345
14346   /* function exit code */
14347   __pyx_L1_error:;
14348   __Pyx_XDECREF(__pyx_t_4);
14349   __Pyx_XDECREF(__pyx_t_7);
14350   __Pyx_AddTraceback("lxml.objectify.__parseBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
14351   __pyx_r = -1;
14352   __pyx_L0:;
14353   __Pyx_RefNannyFinishContext();
14354   return __pyx_r;
14355 }
14356
14357 /* Python wrapper */
14358 static PyObject *__pyx_pw_4lxml_9objectify_5__parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
14359 static PyMethodDef __pyx_mdef_4lxml_9objectify_5__parseBool = {"__parseBool", (PyCFunction)__pyx_pw_4lxml_9objectify_5__parseBool, METH_O, 0};
14360 static PyObject *__pyx_pw_4lxml_9objectify_5__parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
14361   PyObject *__pyx_r = 0;
14362   __Pyx_RefNannyDeclarations
14363   __Pyx_RefNannySetupContext("__parseBool (wrapper)", 0);
14364   __pyx_r = __pyx_pf_4lxml_9objectify_4__parseBool(__pyx_self, ((PyObject *)__pyx_v_s));
14365
14366   /* function exit code */
14367   __Pyx_RefNannyFinishContext();
14368   return __pyx_r;
14369 }
14370
14371 static PyObject *__pyx_pf_4lxml_9objectify_4__parseBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
14372   PyObject *__pyx_r = NULL;
14373   __Pyx_RefNannyDeclarations
14374   int __pyx_t_1;
14375   PyObject *__pyx_t_2 = NULL;
14376   int __pyx_lineno = 0;
14377   const char *__pyx_filename = NULL;
14378   int __pyx_clineno = 0;
14379   __Pyx_RefNannySetupContext("__parseBool", 0);
14380   __Pyx_XDECREF(__pyx_r);
14381   __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)
14382   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error)
14383   __Pyx_GOTREF(__pyx_t_2);
14384   __pyx_r = __pyx_t_2;
14385   __pyx_t_2 = 0;
14386   goto __pyx_L0;
14387
14388   /* function exit code */
14389   __pyx_L1_error:;
14390   __Pyx_XDECREF(__pyx_t_2);
14391   __Pyx_AddTraceback("lxml.objectify.__parseBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
14392   __pyx_r = NULL;
14393   __pyx_L0:;
14394   __Pyx_XGIVEREF(__pyx_r);
14395   __Pyx_RefNannyFinishContext();
14396   return __pyx_r;
14397 }
14398
14399 /* "lxml/objectify.pyx":859
14400  *     return value
14401  * 
14402  * cdef inline int __parseBoolAsInt(text) except -2:             # <<<<<<<<<<<<<<
14403  *     if text == 'false':
14404  *         return 0
14405  */
14406
14407 static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__pyx_v_text) {
14408   int __pyx_r;
14409   __Pyx_RefNannyDeclarations
14410   int __pyx_t_1;
14411   int __pyx_lineno = 0;
14412   const char *__pyx_filename = NULL;
14413   int __pyx_clineno = 0;
14414   __Pyx_RefNannySetupContext("__parseBoolAsInt", 0);
14415
14416   /* "lxml/objectify.pyx":860
14417  * 
14418  * cdef inline int __parseBoolAsInt(text) except -2:
14419  *     if text == 'false':             # <<<<<<<<<<<<<<
14420  *         return 0
14421  *     elif text == 'true':
14422  */
14423   __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)
14424   if (__pyx_t_1) {
14425
14426     /* "lxml/objectify.pyx":861
14427  * cdef inline int __parseBoolAsInt(text) except -2:
14428  *     if text == 'false':
14429  *         return 0             # <<<<<<<<<<<<<<
14430  *     elif text == 'true':
14431  *         return 1
14432  */
14433     __pyx_r = 0;
14434     goto __pyx_L0;
14435
14436     /* "lxml/objectify.pyx":860
14437  * 
14438  * cdef inline int __parseBoolAsInt(text) except -2:
14439  *     if text == 'false':             # <<<<<<<<<<<<<<
14440  *         return 0
14441  *     elif text == 'true':
14442  */
14443   }
14444
14445   /* "lxml/objectify.pyx":862
14446  *     if text == 'false':
14447  *         return 0
14448  *     elif text == 'true':             # <<<<<<<<<<<<<<
14449  *         return 1
14450  *     elif text == '0':
14451  */
14452   __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)
14453   if (__pyx_t_1) {
14454
14455     /* "lxml/objectify.pyx":863
14456  *         return 0
14457  *     elif text == 'true':
14458  *         return 1             # <<<<<<<<<<<<<<
14459  *     elif text == '0':
14460  *         return 0
14461  */
14462     __pyx_r = 1;
14463     goto __pyx_L0;
14464
14465     /* "lxml/objectify.pyx":862
14466  *     if text == 'false':
14467  *         return 0
14468  *     elif text == 'true':             # <<<<<<<<<<<<<<
14469  *         return 1
14470  *     elif text == '0':
14471  */
14472   }
14473
14474   /* "lxml/objectify.pyx":864
14475  *     elif text == 'true':
14476  *         return 1
14477  *     elif text == '0':             # <<<<<<<<<<<<<<
14478  *         return 0
14479  *     elif text == '1':
14480  */
14481   __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)
14482   if (__pyx_t_1) {
14483
14484     /* "lxml/objectify.pyx":865
14485  *         return 1
14486  *     elif text == '0':
14487  *         return 0             # <<<<<<<<<<<<<<
14488  *     elif text == '1':
14489  *         return 1
14490  */
14491     __pyx_r = 0;
14492     goto __pyx_L0;
14493
14494     /* "lxml/objectify.pyx":864
14495  *     elif text == 'true':
14496  *         return 1
14497  *     elif text == '0':             # <<<<<<<<<<<<<<
14498  *         return 0
14499  *     elif text == '1':
14500  */
14501   }
14502
14503   /* "lxml/objectify.pyx":866
14504  *     elif text == '0':
14505  *         return 0
14506  *     elif text == '1':             # <<<<<<<<<<<<<<
14507  *         return 1
14508  *     return -1
14509  */
14510   __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)
14511   if (__pyx_t_1) {
14512
14513     /* "lxml/objectify.pyx":867
14514  *         return 0
14515  *     elif text == '1':
14516  *         return 1             # <<<<<<<<<<<<<<
14517  *     return -1
14518  * 
14519  */
14520     __pyx_r = 1;
14521     goto __pyx_L0;
14522
14523     /* "lxml/objectify.pyx":866
14524  *     elif text == '0':
14525  *         return 0
14526  *     elif text == '1':             # <<<<<<<<<<<<<<
14527  *         return 1
14528  *     return -1
14529  */
14530   }
14531
14532   /* "lxml/objectify.pyx":868
14533  *     elif text == '1':
14534  *         return 1
14535  *     return -1             # <<<<<<<<<<<<<<
14536  * 
14537  * cdef object _parseNumber(NumberElement element):
14538  */
14539   __pyx_r = -1;
14540   goto __pyx_L0;
14541
14542   /* "lxml/objectify.pyx":859
14543  *     return value
14544  * 
14545  * cdef inline int __parseBoolAsInt(text) except -2:             # <<<<<<<<<<<<<<
14546  *     if text == 'false':
14547  *         return 0
14548  */
14549
14550   /* function exit code */
14551   __pyx_L1_error:;
14552   __Pyx_AddTraceback("lxml.objectify.__parseBoolAsInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14553   __pyx_r = -2;
14554   __pyx_L0:;
14555   __Pyx_RefNannyFinishContext();
14556   return __pyx_r;
14557 }
14558
14559 /* "lxml/objectify.pyx":870
14560  *     return -1
14561  * 
14562  * cdef object _parseNumber(NumberElement element):             # <<<<<<<<<<<<<<
14563  *     return element._parse_value(textOf(element._c_node))
14564  * 
14565  */
14566
14567 static PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_element) {
14568   PyObject *__pyx_r = NULL;
14569   __Pyx_RefNannyDeclarations
14570   PyObject *__pyx_t_1 = NULL;
14571   PyObject *__pyx_t_2 = NULL;
14572   PyObject *__pyx_t_3 = NULL;
14573   PyObject *__pyx_t_4 = NULL;
14574   int __pyx_lineno = 0;
14575   const char *__pyx_filename = NULL;
14576   int __pyx_clineno = 0;
14577   __Pyx_RefNannySetupContext("_parseNumber", 0);
14578
14579   /* "lxml/objectify.pyx":871
14580  * 
14581  * cdef object _parseNumber(NumberElement element):
14582  *     return element._parse_value(textOf(element._c_node))             # <<<<<<<<<<<<<<
14583  * 
14584  * cdef object _strValueOf(obj):
14585  */
14586   __Pyx_XDECREF(__pyx_r);
14587   __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)
14588   __Pyx_GOTREF(__pyx_t_2);
14589   __Pyx_INCREF(__pyx_v_element->_parse_value);
14590   __pyx_t_3 = __pyx_v_element->_parse_value; __pyx_t_4 = NULL;
14591   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
14592     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
14593     if (likely(__pyx_t_4)) {
14594       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
14595       __Pyx_INCREF(__pyx_t_4);
14596       __Pyx_INCREF(function);
14597       __Pyx_DECREF_SET(__pyx_t_3, function);
14598     }
14599   }
14600   __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);
14601   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14602   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14603   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
14604   __Pyx_GOTREF(__pyx_t_1);
14605   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14606   __pyx_r = __pyx_t_1;
14607   __pyx_t_1 = 0;
14608   goto __pyx_L0;
14609
14610   /* "lxml/objectify.pyx":870
14611  *     return -1
14612  * 
14613  * cdef object _parseNumber(NumberElement element):             # <<<<<<<<<<<<<<
14614  *     return element._parse_value(textOf(element._c_node))
14615  * 
14616  */
14617
14618   /* function exit code */
14619   __pyx_L1_error:;
14620   __Pyx_XDECREF(__pyx_t_1);
14621   __Pyx_XDECREF(__pyx_t_2);
14622   __Pyx_XDECREF(__pyx_t_3);
14623   __Pyx_XDECREF(__pyx_t_4);
14624   __Pyx_AddTraceback("lxml.objectify._parseNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
14625   __pyx_r = 0;
14626   __pyx_L0:;
14627   __Pyx_XGIVEREF(__pyx_r);
14628   __Pyx_RefNannyFinishContext();
14629   return __pyx_r;
14630 }
14631
14632 /* "lxml/objectify.pyx":873
14633  *     return element._parse_value(textOf(element._c_node))
14634  * 
14635  * cdef object _strValueOf(obj):             # <<<<<<<<<<<<<<
14636  *     if python._isString(obj):
14637  *         return obj
14638  */
14639
14640 static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) {
14641   PyObject *__pyx_r = NULL;
14642   __Pyx_RefNannyDeclarations
14643   int __pyx_t_1;
14644   int __pyx_t_2;
14645   PyObject *__pyx_t_3 = NULL;
14646   PyObject *__pyx_t_4 = NULL;
14647   int __pyx_lineno = 0;
14648   const char *__pyx_filename = NULL;
14649   int __pyx_clineno = 0;
14650   __Pyx_RefNannySetupContext("_strValueOf", 0);
14651
14652   /* "lxml/objectify.pyx":874
14653  * 
14654  * cdef object _strValueOf(obj):
14655  *     if python._isString(obj):             # <<<<<<<<<<<<<<
14656  *         return obj
14657  *     if isinstance(obj, _Element):
14658  */
14659   __pyx_t_1 = (_isString(__pyx_v_obj) != 0);
14660   if (__pyx_t_1) {
14661
14662     /* "lxml/objectify.pyx":875
14663  * cdef object _strValueOf(obj):
14664  *     if python._isString(obj):
14665  *         return obj             # <<<<<<<<<<<<<<
14666  *     if isinstance(obj, _Element):
14667  *         return textOf((<_Element>obj)._c_node) or u''
14668  */
14669     __Pyx_XDECREF(__pyx_r);
14670     __Pyx_INCREF(__pyx_v_obj);
14671     __pyx_r = __pyx_v_obj;
14672     goto __pyx_L0;
14673
14674     /* "lxml/objectify.pyx":874
14675  * 
14676  * cdef object _strValueOf(obj):
14677  *     if python._isString(obj):             # <<<<<<<<<<<<<<
14678  *         return obj
14679  *     if isinstance(obj, _Element):
14680  */
14681   }
14682
14683   /* "lxml/objectify.pyx":876
14684  *     if python._isString(obj):
14685  *         return obj
14686  *     if isinstance(obj, _Element):             # <<<<<<<<<<<<<<
14687  *         return textOf((<_Element>obj)._c_node) or u''
14688  *     if obj is None:
14689  */
14690   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
14691   __pyx_t_2 = (__pyx_t_1 != 0);
14692   if (__pyx_t_2) {
14693
14694     /* "lxml/objectify.pyx":877
14695  *         return obj
14696  *     if isinstance(obj, _Element):
14697  *         return textOf((<_Element>obj)._c_node) or u''             # <<<<<<<<<<<<<<
14698  *     if obj is None:
14699  *         return u''
14700  */
14701     __Pyx_XDECREF(__pyx_r);
14702     __pyx_t_4 = textOf(((struct LxmlElement *)__pyx_v_obj)->_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 877, __pyx_L1_error)
14703     __Pyx_GOTREF(__pyx_t_4);
14704     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 877, __pyx_L1_error)
14705     if (!__pyx_t_2) {
14706       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14707     } else {
14708       __Pyx_INCREF(__pyx_t_4);
14709       __pyx_t_3 = __pyx_t_4;
14710       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14711       goto __pyx_L5_bool_binop_done;
14712     }
14713     __Pyx_INCREF(__pyx_kp_u_);
14714     __pyx_t_3 = __pyx_kp_u_;
14715     __pyx_L5_bool_binop_done:;
14716     __pyx_r = __pyx_t_3;
14717     __pyx_t_3 = 0;
14718     goto __pyx_L0;
14719
14720     /* "lxml/objectify.pyx":876
14721  *     if python._isString(obj):
14722  *         return obj
14723  *     if isinstance(obj, _Element):             # <<<<<<<<<<<<<<
14724  *         return textOf((<_Element>obj)._c_node) or u''
14725  *     if obj is None:
14726  */
14727   }
14728
14729   /* "lxml/objectify.pyx":878
14730  *     if isinstance(obj, _Element):
14731  *         return textOf((<_Element>obj)._c_node) or u''
14732  *     if obj is None:             # <<<<<<<<<<<<<<
14733  *         return u''
14734  *     return unicode(obj)
14735  */
14736   __pyx_t_2 = (__pyx_v_obj == Py_None);
14737   __pyx_t_1 = (__pyx_t_2 != 0);
14738   if (__pyx_t_1) {
14739
14740     /* "lxml/objectify.pyx":879
14741  *         return textOf((<_Element>obj)._c_node) or u''
14742  *     if obj is None:
14743  *         return u''             # <<<<<<<<<<<<<<
14744  *     return unicode(obj)
14745  * 
14746  */
14747     __Pyx_XDECREF(__pyx_r);
14748     __Pyx_INCREF(__pyx_kp_u_);
14749     __pyx_r = __pyx_kp_u_;
14750     goto __pyx_L0;
14751
14752     /* "lxml/objectify.pyx":878
14753  *     if isinstance(obj, _Element):
14754  *         return textOf((<_Element>obj)._c_node) or u''
14755  *     if obj is None:             # <<<<<<<<<<<<<<
14756  *         return u''
14757  *     return unicode(obj)
14758  */
14759   }
14760
14761   /* "lxml/objectify.pyx":880
14762  *     if obj is None:
14763  *         return u''
14764  *     return unicode(obj)             # <<<<<<<<<<<<<<
14765  * 
14766  * cdef object _numericValueOf(obj):
14767  */
14768   __Pyx_XDECREF(__pyx_r);
14769   __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 880, __pyx_L1_error)
14770   __Pyx_GOTREF(__pyx_t_3);
14771   __pyx_r = __pyx_t_3;
14772   __pyx_t_3 = 0;
14773   goto __pyx_L0;
14774
14775   /* "lxml/objectify.pyx":873
14776  *     return element._parse_value(textOf(element._c_node))
14777  * 
14778  * cdef object _strValueOf(obj):             # <<<<<<<<<<<<<<
14779  *     if python._isString(obj):
14780  *         return obj
14781  */
14782
14783   /* function exit code */
14784   __pyx_L1_error:;
14785   __Pyx_XDECREF(__pyx_t_3);
14786   __Pyx_XDECREF(__pyx_t_4);
14787   __Pyx_AddTraceback("lxml.objectify._strValueOf", __pyx_clineno, __pyx_lineno, __pyx_filename);
14788   __pyx_r = 0;
14789   __pyx_L0:;
14790   __Pyx_XGIVEREF(__pyx_r);
14791   __Pyx_RefNannyFinishContext();
14792   return __pyx_r;
14793 }
14794
14795 /* "lxml/objectify.pyx":882
14796  *     return unicode(obj)
14797  * 
14798  * cdef object _numericValueOf(obj):             # <<<<<<<<<<<<<<
14799  *     if isinstance(obj, NumberElement):
14800  *         return _parseNumber(<NumberElement>obj)
14801  */
14802
14803 static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) {
14804   PyObject *__pyx_r = NULL;
14805   __Pyx_RefNannyDeclarations
14806   int __pyx_t_1;
14807   int __pyx_t_2;
14808   PyObject *__pyx_t_3 = NULL;
14809   PyObject *__pyx_t_4 = NULL;
14810   PyObject *__pyx_t_5 = NULL;
14811   PyObject *__pyx_t_6 = NULL;
14812   int __pyx_t_7;
14813   int __pyx_lineno = 0;
14814   const char *__pyx_filename = NULL;
14815   int __pyx_clineno = 0;
14816   __Pyx_RefNannySetupContext("_numericValueOf", 0);
14817
14818   /* "lxml/objectify.pyx":883
14819  * 
14820  * cdef object _numericValueOf(obj):
14821  *     if isinstance(obj, NumberElement):             # <<<<<<<<<<<<<<
14822  *         return _parseNumber(<NumberElement>obj)
14823  *     try:
14824  */
14825   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_4lxml_9objectify_NumberElement); 
14826   __pyx_t_2 = (__pyx_t_1 != 0);
14827   if (__pyx_t_2) {
14828
14829     /* "lxml/objectify.pyx":884
14830  * cdef object _numericValueOf(obj):
14831  *     if isinstance(obj, NumberElement):
14832  *         return _parseNumber(<NumberElement>obj)             # <<<<<<<<<<<<<<
14833  *     try:
14834  *         # not always numeric, but Python will raise the right exception
14835  */
14836     __Pyx_XDECREF(__pyx_r);
14837     __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)
14838     __Pyx_GOTREF(__pyx_t_3);
14839     __pyx_r = __pyx_t_3;
14840     __pyx_t_3 = 0;
14841     goto __pyx_L0;
14842
14843     /* "lxml/objectify.pyx":883
14844  * 
14845  * cdef object _numericValueOf(obj):
14846  *     if isinstance(obj, NumberElement):             # <<<<<<<<<<<<<<
14847  *         return _parseNumber(<NumberElement>obj)
14848  *     try:
14849  */
14850   }
14851
14852   /* "lxml/objectify.pyx":885
14853  *     if isinstance(obj, NumberElement):
14854  *         return _parseNumber(<NumberElement>obj)
14855  *     try:             # <<<<<<<<<<<<<<
14856  *         # not always numeric, but Python will raise the right exception
14857  *         return obj.pyval
14858  */
14859   {
14860     __Pyx_PyThreadState_declare
14861     __Pyx_PyThreadState_assign
14862     __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
14863     __Pyx_XGOTREF(__pyx_t_4);
14864     __Pyx_XGOTREF(__pyx_t_5);
14865     __Pyx_XGOTREF(__pyx_t_6);
14866     /*try:*/ {
14867
14868       /* "lxml/objectify.pyx":887
14869  *     try:
14870  *         # not always numeric, but Python will raise the right exception
14871  *         return obj.pyval             # <<<<<<<<<<<<<<
14872  *     except AttributeError:
14873  *         pass
14874  */
14875       __Pyx_XDECREF(__pyx_r);
14876       __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)
14877       __Pyx_GOTREF(__pyx_t_3);
14878       __pyx_r = __pyx_t_3;
14879       __pyx_t_3 = 0;
14880       goto __pyx_L8_try_return;
14881
14882       /* "lxml/objectify.pyx":885
14883  *     if isinstance(obj, NumberElement):
14884  *         return _parseNumber(<NumberElement>obj)
14885  *     try:             # <<<<<<<<<<<<<<
14886  *         # not always numeric, but Python will raise the right exception
14887  *         return obj.pyval
14888  */
14889     }
14890     __pyx_L4_error:;
14891     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14892
14893     /* "lxml/objectify.pyx":888
14894  *         # not always numeric, but Python will raise the right exception
14895  *         return obj.pyval
14896  *     except AttributeError:             # <<<<<<<<<<<<<<
14897  *         pass
14898  *     return obj
14899  */
14900     __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
14901     if (__pyx_t_7) {
14902       __Pyx_ErrRestore(0,0,0);
14903       goto __pyx_L5_exception_handled;
14904     }
14905     goto __pyx_L6_except_error;
14906     __pyx_L6_except_error:;
14907
14908     /* "lxml/objectify.pyx":885
14909  *     if isinstance(obj, NumberElement):
14910  *         return _parseNumber(<NumberElement>obj)
14911  *     try:             # <<<<<<<<<<<<<<
14912  *         # not always numeric, but Python will raise the right exception
14913  *         return obj.pyval
14914  */
14915     __Pyx_XGIVEREF(__pyx_t_4);
14916     __Pyx_XGIVEREF(__pyx_t_5);
14917     __Pyx_XGIVEREF(__pyx_t_6);
14918     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
14919     goto __pyx_L1_error;
14920     __pyx_L8_try_return:;
14921     __Pyx_XGIVEREF(__pyx_t_4);
14922     __Pyx_XGIVEREF(__pyx_t_5);
14923     __Pyx_XGIVEREF(__pyx_t_6);
14924     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
14925     goto __pyx_L0;
14926     __pyx_L5_exception_handled:;
14927     __Pyx_XGIVEREF(__pyx_t_4);
14928     __Pyx_XGIVEREF(__pyx_t_5);
14929     __Pyx_XGIVEREF(__pyx_t_6);
14930     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
14931   }
14932
14933   /* "lxml/objectify.pyx":890
14934  *     except AttributeError:
14935  *         pass
14936  *     return obj             # <<<<<<<<<<<<<<
14937  * 
14938  * cdef _richcmpPyvals(left, right, int op):
14939  */
14940   __Pyx_XDECREF(__pyx_r);
14941   __Pyx_INCREF(__pyx_v_obj);
14942   __pyx_r = __pyx_v_obj;
14943   goto __pyx_L0;
14944
14945   /* "lxml/objectify.pyx":882
14946  *     return unicode(obj)
14947  * 
14948  * cdef object _numericValueOf(obj):             # <<<<<<<<<<<<<<
14949  *     if isinstance(obj, NumberElement):
14950  *         return _parseNumber(<NumberElement>obj)
14951  */
14952
14953   /* function exit code */
14954   __pyx_L1_error:;
14955   __Pyx_XDECREF(__pyx_t_3);
14956   __Pyx_AddTraceback("lxml.objectify._numericValueOf", __pyx_clineno, __pyx_lineno, __pyx_filename);
14957   __pyx_r = 0;
14958   __pyx_L0:;
14959   __Pyx_XGIVEREF(__pyx_r);
14960   __Pyx_RefNannyFinishContext();
14961   return __pyx_r;
14962 }
14963
14964 /* "lxml/objectify.pyx":892
14965  *     return obj
14966  * 
14967  * cdef _richcmpPyvals(left, right, int op):             # <<<<<<<<<<<<<<
14968  *     left  = getattr(left,  'pyval', left)
14969  *     right = getattr(right, 'pyval', right)
14970  */
14971
14972 static PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *__pyx_v_left, PyObject *__pyx_v_right, int __pyx_v_op) {
14973   PyObject *__pyx_r = NULL;
14974   __Pyx_RefNannyDeclarations
14975   PyObject *__pyx_t_1 = NULL;
14976   int __pyx_lineno = 0;
14977   const char *__pyx_filename = NULL;
14978   int __pyx_clineno = 0;
14979   __Pyx_RefNannySetupContext("_richcmpPyvals", 0);
14980   __Pyx_INCREF(__pyx_v_left);
14981   __Pyx_INCREF(__pyx_v_right);
14982
14983   /* "lxml/objectify.pyx":893
14984  * 
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   __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)
14991   __Pyx_GOTREF(__pyx_t_1);
14992   __Pyx_DECREF_SET(__pyx_v_left, __pyx_t_1);
14993   __pyx_t_1 = 0;
14994
14995   /* "lxml/objectify.pyx":894
14996  * cdef _richcmpPyvals(left, right, int op):
14997  *     left  = getattr(left,  'pyval', left)
14998  *     right = getattr(right, 'pyval', right)             # <<<<<<<<<<<<<<
14999  *     return python.PyObject_RichCompare(left, right, op)
15000  * 
15001  */
15002   __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)
15003   __Pyx_GOTREF(__pyx_t_1);
15004   __Pyx_DECREF_SET(__pyx_v_right, __pyx_t_1);
15005   __pyx_t_1 = 0;
15006
15007   /* "lxml/objectify.pyx":895
15008  *     left  = getattr(left,  'pyval', left)
15009  *     right = getattr(right, 'pyval', right)
15010  *     return python.PyObject_RichCompare(left, right, op)             # <<<<<<<<<<<<<<
15011  * 
15012  * 
15013  */
15014   __Pyx_XDECREF(__pyx_r);
15015   __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)
15016   __Pyx_GOTREF(__pyx_t_1);
15017   __pyx_r = __pyx_t_1;
15018   __pyx_t_1 = 0;
15019   goto __pyx_L0;
15020
15021   /* "lxml/objectify.pyx":892
15022  *     return obj
15023  * 
15024  * cdef _richcmpPyvals(left, right, int op):             # <<<<<<<<<<<<<<
15025  *     left  = getattr(left,  'pyval', left)
15026  *     right = getattr(right, 'pyval', right)
15027  */
15028
15029   /* function exit code */
15030   __pyx_L1_error:;
15031   __Pyx_XDECREF(__pyx_t_1);
15032   __Pyx_AddTraceback("lxml.objectify._richcmpPyvals", __pyx_clineno, __pyx_lineno, __pyx_filename);
15033   __pyx_r = 0;
15034   __pyx_L0:;
15035   __Pyx_XDECREF(__pyx_v_left);
15036   __Pyx_XDECREF(__pyx_v_right);
15037   __Pyx_XGIVEREF(__pyx_r);
15038   __Pyx_RefNannyFinishContext();
15039   return __pyx_r;
15040 }
15041
15042 /* "lxml/objectify.pyx":926
15043  *     cdef object _type
15044  *     cdef list _schema_types
15045  *     def __init__(self, name, type_check, type_class, stringify=None):             # <<<<<<<<<<<<<<
15046  *         if isinstance(name, bytes):
15047  *             name = (<bytes>name).decode('ascii')
15048  */
15049
15050 /* Python wrapper */
15051 static int __pyx_pw_4lxml_9objectify_6PyType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15052 static int __pyx_pw_4lxml_9objectify_6PyType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15053   PyObject *__pyx_v_name = 0;
15054   PyObject *__pyx_v_type_check = 0;
15055   PyObject *__pyx_v_type_class = 0;
15056   PyObject *__pyx_v_stringify = 0;
15057   int __pyx_lineno = 0;
15058   const char *__pyx_filename = NULL;
15059   int __pyx_clineno = 0;
15060   int __pyx_r;
15061   __Pyx_RefNannyDeclarations
15062   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
15063   {
15064     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_type_check,&__pyx_n_s_type_class,&__pyx_n_s_stringify,0};
15065     PyObject* values[4] = {0,0,0,0};
15066     values[3] = ((PyObject *)Py_None);
15067     if (unlikely(__pyx_kwds)) {
15068       Py_ssize_t kw_args;
15069       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15070       switch (pos_args) {
15071         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
15072         CYTHON_FALLTHROUGH;
15073         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15074         CYTHON_FALLTHROUGH;
15075         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15076         CYTHON_FALLTHROUGH;
15077         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15078         CYTHON_FALLTHROUGH;
15079         case  0: break;
15080         default: goto __pyx_L5_argtuple_error;
15081       }
15082       kw_args = PyDict_Size(__pyx_kwds);
15083       switch (pos_args) {
15084         case  0:
15085         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
15086         else goto __pyx_L5_argtuple_error;
15087         CYTHON_FALLTHROUGH;
15088         case  1:
15089         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type_check)) != 0)) kw_args--;
15090         else {
15091           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 926, __pyx_L3_error)
15092         }
15093         CYTHON_FALLTHROUGH;
15094         case  2:
15095         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type_class)) != 0)) kw_args--;
15096         else {
15097           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 926, __pyx_L3_error)
15098         }
15099         CYTHON_FALLTHROUGH;
15100         case  3:
15101         if (kw_args > 0) {
15102           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stringify);
15103           if (value) { values[3] = value; kw_args--; }
15104         }
15105       }
15106       if (unlikely(kw_args > 0)) {
15107         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 926, __pyx_L3_error)
15108       }
15109     } else {
15110       switch (PyTuple_GET_SIZE(__pyx_args)) {
15111         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
15112         CYTHON_FALLTHROUGH;
15113         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15114         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15115         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15116         break;
15117         default: goto __pyx_L5_argtuple_error;
15118       }
15119     }
15120     __pyx_v_name = values[0];
15121     __pyx_v_type_check = values[1];
15122     __pyx_v_type_class = values[2];
15123     __pyx_v_stringify = values[3];
15124   }
15125   goto __pyx_L4_argument_unpacking_done;
15126   __pyx_L5_argtuple_error:;
15127   __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 926, __pyx_L3_error)
15128   __pyx_L3_error:;
15129   __Pyx_AddTraceback("lxml.objectify.PyType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15130   __Pyx_RefNannyFinishContext();
15131   return -1;
15132   __pyx_L4_argument_unpacking_done:;
15133   __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);
15134
15135   /* function exit code */
15136   __Pyx_RefNannyFinishContext();
15137   return __pyx_r;
15138 }
15139
15140 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) {
15141   int __pyx_r;
15142   __Pyx_RefNannyDeclarations
15143   int __pyx_t_1;
15144   int __pyx_t_2;
15145   PyObject *__pyx_t_3 = NULL;
15146   int __pyx_t_4;
15147   int __pyx_lineno = 0;
15148   const char *__pyx_filename = NULL;
15149   int __pyx_clineno = 0;
15150   __Pyx_RefNannySetupContext("__init__", 0);
15151   __Pyx_INCREF(__pyx_v_name);
15152   __Pyx_INCREF(__pyx_v_stringify);
15153
15154   /* "lxml/objectify.pyx":927
15155  *     cdef list _schema_types
15156  *     def __init__(self, name, type_check, type_class, stringify=None):
15157  *         if isinstance(name, bytes):             # <<<<<<<<<<<<<<
15158  *             name = (<bytes>name).decode('ascii')
15159  *         elif not isinstance(name, unicode):
15160  */
15161   __pyx_t_1 = PyBytes_Check(__pyx_v_name); 
15162   __pyx_t_2 = (__pyx_t_1 != 0);
15163   if (__pyx_t_2) {
15164
15165     /* "lxml/objectify.pyx":928
15166  *     def __init__(self, name, type_check, type_class, stringify=None):
15167  *         if isinstance(name, bytes):
15168  *             name = (<bytes>name).decode('ascii')             # <<<<<<<<<<<<<<
15169  *         elif not isinstance(name, unicode):
15170  *             raise TypeError, u"Type name must be a string"
15171  */
15172     if (unlikely(__pyx_v_name == Py_None)) {
15173       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
15174       __PYX_ERR(0, 928, __pyx_L1_error)
15175     }
15176     __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)
15177     __Pyx_GOTREF(__pyx_t_3);
15178     __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3);
15179     __pyx_t_3 = 0;
15180
15181     /* "lxml/objectify.pyx":927
15182  *     cdef list _schema_types
15183  *     def __init__(self, name, type_check, type_class, stringify=None):
15184  *         if isinstance(name, bytes):             # <<<<<<<<<<<<<<
15185  *             name = (<bytes>name).decode('ascii')
15186  *         elif not isinstance(name, unicode):
15187  */
15188     goto __pyx_L3;
15189   }
15190
15191   /* "lxml/objectify.pyx":929
15192  *         if isinstance(name, bytes):
15193  *             name = (<bytes>name).decode('ascii')
15194  *         elif not isinstance(name, unicode):             # <<<<<<<<<<<<<<
15195  *             raise TypeError, u"Type name must be a string"
15196  *         if type_check is not None and not callable(type_check):
15197  */
15198   __pyx_t_2 = PyUnicode_Check(__pyx_v_name); 
15199   __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
15200   if (unlikely(__pyx_t_1)) {
15201
15202     /* "lxml/objectify.pyx":930
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  *             raise TypeError, u"Type check function must be callable (or None)"
15208  */
15209     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Type_name_must_be_a_string, 0, 0);
15210     __PYX_ERR(0, 930, __pyx_L1_error)
15211
15212     /* "lxml/objectify.pyx":929
15213  *         if isinstance(name, bytes):
15214  *             name = (<bytes>name).decode('ascii')
15215  *         elif not isinstance(name, unicode):             # <<<<<<<<<<<<<<
15216  *             raise TypeError, u"Type name must be a string"
15217  *         if type_check is not None and not callable(type_check):
15218  */
15219   }
15220   __pyx_L3:;
15221
15222   /* "lxml/objectify.pyx":931
15223  *         elif not isinstance(name, unicode):
15224  *             raise TypeError, u"Type name must be a string"
15225  *         if type_check is not None and not callable(type_check):             # <<<<<<<<<<<<<<
15226  *             raise TypeError, u"Type check function must be callable (or None)"
15227  *         if name != TREE_PYTYPE_NAME and \
15228  */
15229   __pyx_t_2 = (__pyx_v_type_check != Py_None);
15230   __pyx_t_4 = (__pyx_t_2 != 0);
15231   if (__pyx_t_4) {
15232   } else {
15233     __pyx_t_1 = __pyx_t_4;
15234     goto __pyx_L5_bool_binop_done;
15235   }
15236   __pyx_t_4 = __Pyx_PyCallable_Check(__pyx_v_type_check); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 931, __pyx_L1_error)
15237   __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0);
15238   __pyx_t_1 = __pyx_t_2;
15239   __pyx_L5_bool_binop_done:;
15240   if (unlikely(__pyx_t_1)) {
15241
15242     /* "lxml/objectify.pyx":932
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  *                not issubclass(type_class, ObjectifiedDataElement):
15248  */
15249     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Type_check_function_must_be_call, 0, 0);
15250     __PYX_ERR(0, 932, __pyx_L1_error)
15251
15252     /* "lxml/objectify.pyx":931
15253  *         elif not isinstance(name, unicode):
15254  *             raise TypeError, u"Type name must be a string"
15255  *         if type_check is not None and not callable(type_check):             # <<<<<<<<<<<<<<
15256  *             raise TypeError, u"Type check function must be callable (or None)"
15257  *         if name != TREE_PYTYPE_NAME and \
15258  */
15259   }
15260
15261   /* "lxml/objectify.pyx":933
15262  *         if type_check is not None and not callable(type_check):
15263  *             raise TypeError, u"Type check function must be callable (or None)"
15264  *         if name != TREE_PYTYPE_NAME and \             # <<<<<<<<<<<<<<
15265  *                not issubclass(type_class, ObjectifiedDataElement):
15266  *             raise TypeError, \
15267  */
15268   __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)
15269   if (__pyx_t_2) {
15270   } else {
15271     __pyx_t_1 = __pyx_t_2;
15272     goto __pyx_L8_bool_binop_done;
15273   }
15274
15275   /* "lxml/objectify.pyx":934
15276  *             raise TypeError, u"Type check function must be callable (or None)"
15277  *         if name != TREE_PYTYPE_NAME and \
15278  *                not issubclass(type_class, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
15279  *             raise TypeError, \
15280  *                 u"Data classes must inherit from ObjectifiedDataElement"
15281  */
15282   __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)
15283   __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
15284   __pyx_t_1 = __pyx_t_4;
15285   __pyx_L8_bool_binop_done:;
15286
15287   /* "lxml/objectify.pyx":933
15288  *         if type_check is not None and not callable(type_check):
15289  *             raise TypeError, u"Type check function must be callable (or None)"
15290  *         if name != TREE_PYTYPE_NAME and \             # <<<<<<<<<<<<<<
15291  *                not issubclass(type_class, ObjectifiedDataElement):
15292  *             raise TypeError, \
15293  */
15294   if (unlikely(__pyx_t_1)) {
15295
15296     /* "lxml/objectify.pyx":935
15297  *         if name != TREE_PYTYPE_NAME and \
15298  *                not issubclass(type_class, ObjectifiedDataElement):
15299  *             raise TypeError, \             # <<<<<<<<<<<<<<
15300  *                 u"Data classes must inherit from ObjectifiedDataElement"
15301  *         self.name  = name
15302  */
15303     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Data_classes_must_inherit_from_O, 0, 0);
15304     __PYX_ERR(0, 935, __pyx_L1_error)
15305
15306     /* "lxml/objectify.pyx":933
15307  *         if type_check is not None and not callable(type_check):
15308  *             raise TypeError, u"Type check function must be callable (or None)"
15309  *         if name != TREE_PYTYPE_NAME and \             # <<<<<<<<<<<<<<
15310  *                not issubclass(type_class, ObjectifiedDataElement):
15311  *             raise TypeError, \
15312  */
15313   }
15314
15315   /* "lxml/objectify.pyx":937
15316  *             raise TypeError, \
15317  *                 u"Data classes must inherit from ObjectifiedDataElement"
15318  *         self.name  = name             # <<<<<<<<<<<<<<
15319  *         self._type = type_class
15320  *         self.type_check = type_check
15321  */
15322   __Pyx_INCREF(__pyx_v_name);
15323   __Pyx_GIVEREF(__pyx_v_name);
15324   __Pyx_GOTREF(__pyx_v_self->name);
15325   __Pyx_DECREF(__pyx_v_self->name);
15326   __pyx_v_self->name = __pyx_v_name;
15327
15328   /* "lxml/objectify.pyx":938
15329  *                 u"Data classes must inherit from ObjectifiedDataElement"
15330  *         self.name  = name
15331  *         self._type = type_class             # <<<<<<<<<<<<<<
15332  *         self.type_check = type_check
15333  *         if stringify is None:
15334  */
15335   __Pyx_INCREF(__pyx_v_type_class);
15336   __Pyx_GIVEREF(__pyx_v_type_class);
15337   __Pyx_GOTREF(__pyx_v_self->_type);
15338   __Pyx_DECREF(__pyx_v_self->_type);
15339   __pyx_v_self->_type = __pyx_v_type_class;
15340
15341   /* "lxml/objectify.pyx":939
15342  *         self.name  = name
15343  *         self._type = type_class
15344  *         self.type_check = type_check             # <<<<<<<<<<<<<<
15345  *         if stringify is None:
15346  *             stringify = unicode
15347  */
15348   __Pyx_INCREF(__pyx_v_type_check);
15349   __Pyx_GIVEREF(__pyx_v_type_check);
15350   __Pyx_GOTREF(__pyx_v_self->type_check);
15351   __Pyx_DECREF(__pyx_v_self->type_check);
15352   __pyx_v_self->type_check = __pyx_v_type_check;
15353
15354   /* "lxml/objectify.pyx":940
15355  *         self._type = type_class
15356  *         self.type_check = type_check
15357  *         if stringify is None:             # <<<<<<<<<<<<<<
15358  *             stringify = unicode
15359  *         self.stringify = stringify
15360  */
15361   __pyx_t_1 = (__pyx_v_stringify == Py_None);
15362   __pyx_t_4 = (__pyx_t_1 != 0);
15363   if (__pyx_t_4) {
15364
15365     /* "lxml/objectify.pyx":941
15366  *         self.type_check = type_check
15367  *         if stringify is None:
15368  *             stringify = unicode             # <<<<<<<<<<<<<<
15369  *         self.stringify = stringify
15370  *         self._schema_types = []
15371  */
15372     __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
15373     __Pyx_DECREF_SET(__pyx_v_stringify, ((PyObject *)(&PyUnicode_Type)));
15374
15375     /* "lxml/objectify.pyx":940
15376  *         self._type = type_class
15377  *         self.type_check = type_check
15378  *         if stringify is None:             # <<<<<<<<<<<<<<
15379  *             stringify = unicode
15380  *         self.stringify = stringify
15381  */
15382   }
15383
15384   /* "lxml/objectify.pyx":942
15385  *         if stringify is None:
15386  *             stringify = unicode
15387  *         self.stringify = stringify             # <<<<<<<<<<<<<<
15388  *         self._schema_types = []
15389  * 
15390  */
15391   __Pyx_INCREF(__pyx_v_stringify);
15392   __Pyx_GIVEREF(__pyx_v_stringify);
15393   __Pyx_GOTREF(__pyx_v_self->stringify);
15394   __Pyx_DECREF(__pyx_v_self->stringify);
15395   __pyx_v_self->stringify = __pyx_v_stringify;
15396
15397   /* "lxml/objectify.pyx":943
15398  *             stringify = unicode
15399  *         self.stringify = stringify
15400  *         self._schema_types = []             # <<<<<<<<<<<<<<
15401  * 
15402  *     def __repr__(self):
15403  */
15404   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
15405   __Pyx_GOTREF(__pyx_t_3);
15406   __Pyx_GIVEREF(__pyx_t_3);
15407   __Pyx_GOTREF(__pyx_v_self->_schema_types);
15408   __Pyx_DECREF(__pyx_v_self->_schema_types);
15409   __pyx_v_self->_schema_types = ((PyObject*)__pyx_t_3);
15410   __pyx_t_3 = 0;
15411
15412   /* "lxml/objectify.pyx":926
15413  *     cdef object _type
15414  *     cdef list _schema_types
15415  *     def __init__(self, name, type_check, type_class, stringify=None):             # <<<<<<<<<<<<<<
15416  *         if isinstance(name, bytes):
15417  *             name = (<bytes>name).decode('ascii')
15418  */
15419
15420   /* function exit code */
15421   __pyx_r = 0;
15422   goto __pyx_L0;
15423   __pyx_L1_error:;
15424   __Pyx_XDECREF(__pyx_t_3);
15425   __Pyx_AddTraceback("lxml.objectify.PyType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15426   __pyx_r = -1;
15427   __pyx_L0:;
15428   __Pyx_XDECREF(__pyx_v_name);
15429   __Pyx_XDECREF(__pyx_v_stringify);
15430   __Pyx_RefNannyFinishContext();
15431   return __pyx_r;
15432 }
15433
15434 /* "lxml/objectify.pyx":945
15435  *         self._schema_types = []
15436  * 
15437  *     def __repr__(self):             # <<<<<<<<<<<<<<
15438  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
15439  * 
15440  */
15441
15442 /* Python wrapper */
15443 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_3__repr__(PyObject *__pyx_v_self); /*proto*/
15444 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_3__repr__(PyObject *__pyx_v_self) {
15445   PyObject *__pyx_r = 0;
15446   __Pyx_RefNannyDeclarations
15447   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
15448   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_2__repr__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
15449
15450   /* function exit code */
15451   __Pyx_RefNannyFinishContext();
15452   return __pyx_r;
15453 }
15454
15455 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_2__repr__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
15456   PyObject *__pyx_r = NULL;
15457   __Pyx_RefNannyDeclarations
15458   PyObject *__pyx_t_1 = NULL;
15459   PyObject *__pyx_t_2 = NULL;
15460   int __pyx_lineno = 0;
15461   const char *__pyx_filename = NULL;
15462   int __pyx_clineno = 0;
15463   __Pyx_RefNannySetupContext("__repr__", 0);
15464
15465   /* "lxml/objectify.pyx":946
15466  * 
15467  *     def __repr__(self):
15468  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)             # <<<<<<<<<<<<<<
15469  * 
15470  *     def register(self, before=None, after=None):
15471  */
15472   __Pyx_XDECREF(__pyx_r);
15473   __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)
15474   __Pyx_GOTREF(__pyx_t_1);
15475   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
15476   __Pyx_GOTREF(__pyx_t_2);
15477   __Pyx_INCREF(__pyx_v_self->name);
15478   __Pyx_GIVEREF(__pyx_v_self->name);
15479   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name);
15480   __Pyx_GIVEREF(__pyx_t_1);
15481   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
15482   __pyx_t_1 = 0;
15483   __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)
15484   __Pyx_GOTREF(__pyx_t_1);
15485   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15486   __pyx_r = __pyx_t_1;
15487   __pyx_t_1 = 0;
15488   goto __pyx_L0;
15489
15490   /* "lxml/objectify.pyx":945
15491  *         self._schema_types = []
15492  * 
15493  *     def __repr__(self):             # <<<<<<<<<<<<<<
15494  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
15495  * 
15496  */
15497
15498   /* function exit code */
15499   __pyx_L1_error:;
15500   __Pyx_XDECREF(__pyx_t_1);
15501   __Pyx_XDECREF(__pyx_t_2);
15502   __Pyx_AddTraceback("lxml.objectify.PyType.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15503   __pyx_r = NULL;
15504   __pyx_L0:;
15505   __Pyx_XGIVEREF(__pyx_r);
15506   __Pyx_RefNannyFinishContext();
15507   return __pyx_r;
15508 }
15509
15510 /* "lxml/objectify.pyx":948
15511  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
15512  * 
15513  *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
15514  *         u"""register(self, before=None, after=None)
15515  * 
15516  */
15517
15518 /* Python wrapper */
15519 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_5register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15520 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        ";
15521 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};
15522 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_5register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15523   PyObject *__pyx_v_before = 0;
15524   PyObject *__pyx_v_after = 0;
15525   int __pyx_lineno = 0;
15526   const char *__pyx_filename = NULL;
15527   int __pyx_clineno = 0;
15528   PyObject *__pyx_r = 0;
15529   __Pyx_RefNannyDeclarations
15530   __Pyx_RefNannySetupContext("register (wrapper)", 0);
15531   {
15532     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_before,&__pyx_n_s_after,0};
15533     PyObject* values[2] = {0,0};
15534     values[0] = ((PyObject *)Py_None);
15535     values[1] = ((PyObject *)Py_None);
15536     if (unlikely(__pyx_kwds)) {
15537       Py_ssize_t kw_args;
15538       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15539       switch (pos_args) {
15540         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15541         CYTHON_FALLTHROUGH;
15542         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15543         CYTHON_FALLTHROUGH;
15544         case  0: break;
15545         default: goto __pyx_L5_argtuple_error;
15546       }
15547       kw_args = PyDict_Size(__pyx_kwds);
15548       switch (pos_args) {
15549         case  0:
15550         if (kw_args > 0) {
15551           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_before);
15552           if (value) { values[0] = value; kw_args--; }
15553         }
15554         CYTHON_FALLTHROUGH;
15555         case  1:
15556         if (kw_args > 0) {
15557           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_after);
15558           if (value) { values[1] = value; kw_args--; }
15559         }
15560       }
15561       if (unlikely(kw_args > 0)) {
15562         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register") < 0)) __PYX_ERR(0, 948, __pyx_L3_error)
15563       }
15564     } else {
15565       switch (PyTuple_GET_SIZE(__pyx_args)) {
15566         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15567         CYTHON_FALLTHROUGH;
15568         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15569         CYTHON_FALLTHROUGH;
15570         case  0: break;
15571         default: goto __pyx_L5_argtuple_error;
15572       }
15573     }
15574     __pyx_v_before = values[0];
15575     __pyx_v_after = values[1];
15576   }
15577   goto __pyx_L4_argument_unpacking_done;
15578   __pyx_L5_argtuple_error:;
15579   __Pyx_RaiseArgtupleInvalid("register", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 948, __pyx_L3_error)
15580   __pyx_L3_error:;
15581   __Pyx_AddTraceback("lxml.objectify.PyType.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
15582   __Pyx_RefNannyFinishContext();
15583   return NULL;
15584   __pyx_L4_argument_unpacking_done:;
15585   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_4register(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self), __pyx_v_before, __pyx_v_after);
15586
15587   /* function exit code */
15588   __Pyx_RefNannyFinishContext();
15589   return __pyx_r;
15590 }
15591
15592 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) {
15593   PyObject *__pyx_v_item = NULL;
15594   PyObject *__pyx_v_entry = NULL;
15595   PyObject *__pyx_v_first_pos = NULL;
15596   PyObject *__pyx_v_last_pos = NULL;
15597   PyObject *__pyx_v_i = NULL;
15598   CYTHON_UNUSED PyObject *__pyx_v_check = NULL;
15599   PyObject *__pyx_v_pytype = NULL;
15600   PyObject *__pyx_v_xs_type = NULL;
15601   PyObject *__pyx_r = NULL;
15602   __Pyx_RefNannyDeclarations
15603   int __pyx_t_1;
15604   int __pyx_t_2;
15605   PyObject *__pyx_t_3 = NULL;
15606   Py_ssize_t __pyx_t_4;
15607   PyObject *__pyx_t_5 = NULL;
15608   PyObject *__pyx_t_6 = NULL;
15609   PyObject *__pyx_t_7 = NULL;
15610   PyObject *__pyx_t_8 = NULL;
15611   PyObject *__pyx_t_9 = NULL;
15612   PyObject *(*__pyx_t_10)(PyObject *);
15613   int __pyx_t_11;
15614   int __pyx_t_12;
15615   int __pyx_lineno = 0;
15616   const char *__pyx_filename = NULL;
15617   int __pyx_clineno = 0;
15618   __Pyx_RefNannySetupContext("register", 0);
15619   __Pyx_INCREF(__pyx_v_before);
15620   __Pyx_INCREF(__pyx_v_after);
15621
15622   /* "lxml/objectify.pyx":958
15623  *         ignored.  Raises ValueError if the dependencies cannot be fulfilled.
15624  *         """
15625  *         if self.name == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
15626  *             raise ValueError, u"Cannot register tree type"
15627  *         if self.type_check is not None:
15628  */
15629   __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)
15630   if (unlikely(__pyx_t_1)) {
15631
15632     /* "lxml/objectify.pyx":959
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  *             for item in _TYPE_CHECKS:
15638  */
15639     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Cannot_register_tree_type, 0, 0);
15640     __PYX_ERR(0, 959, __pyx_L1_error)
15641
15642     /* "lxml/objectify.pyx":958
15643  *         ignored.  Raises ValueError if the dependencies cannot be fulfilled.
15644  *         """
15645  *         if self.name == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
15646  *             raise ValueError, u"Cannot register tree type"
15647  *         if self.type_check is not None:
15648  */
15649   }
15650
15651   /* "lxml/objectify.pyx":960
15652  *         if self.name == TREE_PYTYPE_NAME:
15653  *             raise ValueError, u"Cannot register tree type"
15654  *         if self.type_check is not None:             # <<<<<<<<<<<<<<
15655  *             for item in _TYPE_CHECKS:
15656  *                 if item[0] is self.type_check:
15657  */
15658   __pyx_t_1 = (__pyx_v_self->type_check != Py_None);
15659   __pyx_t_2 = (__pyx_t_1 != 0);
15660   if (__pyx_t_2) {
15661
15662     /* "lxml/objectify.pyx":961
15663  *             raise ValueError, u"Cannot register tree type"
15664  *         if self.type_check is not None:
15665  *             for item in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
15666  *                 if item[0] is self.type_check:
15667  *                     _TYPE_CHECKS.remove(item)
15668  */
15669     if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
15670       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
15671       __PYX_ERR(0, 961, __pyx_L1_error)
15672     }
15673     __pyx_t_3 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
15674     for (;;) {
15675       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
15676       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15677       __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)
15678       #else
15679       __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)
15680       __Pyx_GOTREF(__pyx_t_5);
15681       #endif
15682       __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
15683       __pyx_t_5 = 0;
15684
15685       /* "lxml/objectify.pyx":962
15686  *         if self.type_check is not None:
15687  *             for item in _TYPE_CHECKS:
15688  *                 if item[0] is self.type_check:             # <<<<<<<<<<<<<<
15689  *                     _TYPE_CHECKS.remove(item)
15690  *                     break
15691  */
15692       __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)
15693       __Pyx_GOTREF(__pyx_t_5);
15694       __pyx_t_2 = (__pyx_t_5 == __pyx_v_self->type_check);
15695       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15696       __pyx_t_1 = (__pyx_t_2 != 0);
15697       if (__pyx_t_1) {
15698
15699         /* "lxml/objectify.pyx":963
15700  *             for item in _TYPE_CHECKS:
15701  *                 if item[0] is self.type_check:
15702  *                     _TYPE_CHECKS.remove(item)             # <<<<<<<<<<<<<<
15703  *                     break
15704  *             entry = (self.type_check, self)
15705  */
15706         __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)
15707         __Pyx_GOTREF(__pyx_t_5);
15708         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15709
15710         /* "lxml/objectify.pyx":964
15711  *                 if item[0] is self.type_check:
15712  *                     _TYPE_CHECKS.remove(item)
15713  *                     break             # <<<<<<<<<<<<<<
15714  *             entry = (self.type_check, self)
15715  *             first_pos = 0
15716  */
15717         goto __pyx_L6_break;
15718
15719         /* "lxml/objectify.pyx":962
15720  *         if self.type_check is not None:
15721  *             for item in _TYPE_CHECKS:
15722  *                 if item[0] is self.type_check:             # <<<<<<<<<<<<<<
15723  *                     _TYPE_CHECKS.remove(item)
15724  *                     break
15725  */
15726       }
15727
15728       /* "lxml/objectify.pyx":961
15729  *             raise ValueError, u"Cannot register tree type"
15730  *         if self.type_check is not None:
15731  *             for item in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
15732  *                 if item[0] is self.type_check:
15733  *                     _TYPE_CHECKS.remove(item)
15734  */
15735     }
15736     __pyx_L6_break:;
15737     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15738
15739     /* "lxml/objectify.pyx":965
15740  *                     _TYPE_CHECKS.remove(item)
15741  *                     break
15742  *             entry = (self.type_check, self)             # <<<<<<<<<<<<<<
15743  *             first_pos = 0
15744  *             last_pos = -1
15745  */
15746     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L1_error)
15747     __Pyx_GOTREF(__pyx_t_3);
15748     __Pyx_INCREF(__pyx_v_self->type_check);
15749     __Pyx_GIVEREF(__pyx_v_self->type_check);
15750     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->type_check);
15751     __Pyx_INCREF(((PyObject *)__pyx_v_self));
15752     __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
15753     PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
15754     __pyx_v_entry = ((PyObject*)__pyx_t_3);
15755     __pyx_t_3 = 0;
15756
15757     /* "lxml/objectify.pyx":966
15758  *                     break
15759  *             entry = (self.type_check, self)
15760  *             first_pos = 0             # <<<<<<<<<<<<<<
15761  *             last_pos = -1
15762  *             if before or after:
15763  */
15764     __Pyx_INCREF(__pyx_int_0);
15765     __pyx_v_first_pos = __pyx_int_0;
15766
15767     /* "lxml/objectify.pyx":967
15768  *             entry = (self.type_check, self)
15769  *             first_pos = 0
15770  *             last_pos = -1             # <<<<<<<<<<<<<<
15771  *             if before or after:
15772  *                 if before is None:
15773  */
15774     __Pyx_INCREF(__pyx_int_neg_1);
15775     __pyx_v_last_pos = __pyx_int_neg_1;
15776
15777     /* "lxml/objectify.pyx":968
15778  *             first_pos = 0
15779  *             last_pos = -1
15780  *             if before or after:             # <<<<<<<<<<<<<<
15781  *                 if before is None:
15782  *                     before = ()
15783  */
15784     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_before); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
15785     if (!__pyx_t_2) {
15786     } else {
15787       __pyx_t_1 = __pyx_t_2;
15788       goto __pyx_L9_bool_binop_done;
15789     }
15790     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_after); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
15791     __pyx_t_1 = __pyx_t_2;
15792     __pyx_L9_bool_binop_done:;
15793     if (__pyx_t_1) {
15794
15795       /* "lxml/objectify.pyx":969
15796  *             last_pos = -1
15797  *             if before or after:
15798  *                 if before is None:             # <<<<<<<<<<<<<<
15799  *                     before = ()
15800  *                 elif after is None:
15801  */
15802       __pyx_t_1 = (__pyx_v_before == Py_None);
15803       __pyx_t_2 = (__pyx_t_1 != 0);
15804       if (__pyx_t_2) {
15805
15806         /* "lxml/objectify.pyx":970
15807  *             if before or after:
15808  *                 if before is None:
15809  *                     before = ()             # <<<<<<<<<<<<<<
15810  *                 elif after is None:
15811  *                     after = ()
15812  */
15813         __Pyx_INCREF(__pyx_empty_tuple);
15814         __Pyx_DECREF_SET(__pyx_v_before, __pyx_empty_tuple);
15815
15816         /* "lxml/objectify.pyx":969
15817  *             last_pos = -1
15818  *             if before or after:
15819  *                 if before is None:             # <<<<<<<<<<<<<<
15820  *                     before = ()
15821  *                 elif after is None:
15822  */
15823         goto __pyx_L11;
15824       }
15825
15826       /* "lxml/objectify.pyx":971
15827  *                 if before is None:
15828  *                     before = ()
15829  *                 elif after is None:             # <<<<<<<<<<<<<<
15830  *                     after = ()
15831  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15832  */
15833       __pyx_t_2 = (__pyx_v_after == Py_None);
15834       __pyx_t_1 = (__pyx_t_2 != 0);
15835       if (__pyx_t_1) {
15836
15837         /* "lxml/objectify.pyx":972
15838  *                     before = ()
15839  *                 elif after is None:
15840  *                     after = ()             # <<<<<<<<<<<<<<
15841  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15842  *                     if last_pos == -1 and pytype.name in before:
15843  */
15844         __Pyx_INCREF(__pyx_empty_tuple);
15845         __Pyx_DECREF_SET(__pyx_v_after, __pyx_empty_tuple);
15846
15847         /* "lxml/objectify.pyx":971
15848  *                 if before is None:
15849  *                     before = ()
15850  *                 elif after is None:             # <<<<<<<<<<<<<<
15851  *                     after = ()
15852  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15853  */
15854       }
15855       __pyx_L11:;
15856
15857       /* "lxml/objectify.pyx":973
15858  *                 elif after is None:
15859  *                     after = ()
15860  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<<
15861  *                     if last_pos == -1 and pytype.name in before:
15862  *                         last_pos = i
15863  */
15864       __Pyx_INCREF(__pyx_int_0);
15865       __pyx_t_3 = __pyx_int_0;
15866       __pyx_t_5 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = 0;
15867       for (;;) {
15868         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
15869         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15870         __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)
15871         #else
15872         __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)
15873         __Pyx_GOTREF(__pyx_t_6);
15874         #endif
15875         if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
15876           PyObject* sequence = __pyx_t_6;
15877           Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
15878           if (unlikely(size != 2)) {
15879             if (size > 2) __Pyx_RaiseTooManyValuesError(2);
15880             else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
15881             __PYX_ERR(0, 973, __pyx_L1_error)
15882           }
15883           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15884           if (likely(PyTuple_CheckExact(sequence))) {
15885             __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
15886             __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
15887           } else {
15888             __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
15889             __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
15890           }
15891           __Pyx_INCREF(__pyx_t_7);
15892           __Pyx_INCREF(__pyx_t_8);
15893           #else
15894           __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 973, __pyx_L1_error)
15895           __Pyx_GOTREF(__pyx_t_7);
15896           __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 973, __pyx_L1_error)
15897           __Pyx_GOTREF(__pyx_t_8);
15898           #endif
15899           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15900         } else {
15901           Py_ssize_t index = -1;
15902           __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 973, __pyx_L1_error)
15903           __Pyx_GOTREF(__pyx_t_9);
15904           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15905           __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
15906           index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L14_unpacking_failed;
15907           __Pyx_GOTREF(__pyx_t_7);
15908           index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L14_unpacking_failed;
15909           __Pyx_GOTREF(__pyx_t_8);
15910           if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 973, __pyx_L1_error)
15911           __pyx_t_10 = NULL;
15912           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15913           goto __pyx_L15_unpacking_done;
15914           __pyx_L14_unpacking_failed:;
15915           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15916           __pyx_t_10 = NULL;
15917           if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
15918           __PYX_ERR(0, 973, __pyx_L1_error)
15919           __pyx_L15_unpacking_done:;
15920         }
15921         __Pyx_XDECREF_SET(__pyx_v_check, __pyx_t_7);
15922         __pyx_t_7 = 0;
15923         __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_8);
15924         __pyx_t_8 = 0;
15925         __Pyx_INCREF(__pyx_t_3);
15926         __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
15927         __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)
15928         __Pyx_GOTREF(__pyx_t_6);
15929         __Pyx_DECREF(__pyx_t_3);
15930         __pyx_t_3 = __pyx_t_6;
15931         __pyx_t_6 = 0;
15932
15933         /* "lxml/objectify.pyx":974
15934  *                     after = ()
15935  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15936  *                     if last_pos == -1 and pytype.name in before:             # <<<<<<<<<<<<<<
15937  *                         last_pos = i
15938  *                     if pytype.name in after:
15939  */
15940         __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)
15941         __Pyx_GOTREF(__pyx_t_6);
15942         __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 974, __pyx_L1_error)
15943         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15944         if (__pyx_t_2) {
15945         } else {
15946           __pyx_t_1 = __pyx_t_2;
15947           goto __pyx_L17_bool_binop_done;
15948         }
15949         __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)
15950         __Pyx_GOTREF(__pyx_t_6);
15951         __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)
15952         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15953         __pyx_t_11 = (__pyx_t_2 != 0);
15954         __pyx_t_1 = __pyx_t_11;
15955         __pyx_L17_bool_binop_done:;
15956         if (__pyx_t_1) {
15957
15958           /* "lxml/objectify.pyx":975
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  *                         first_pos = i+1
15964  */
15965           __Pyx_INCREF(__pyx_v_i);
15966           __Pyx_DECREF_SET(__pyx_v_last_pos, __pyx_v_i);
15967
15968           /* "lxml/objectify.pyx":974
15969  *                     after = ()
15970  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15971  *                     if last_pos == -1 and pytype.name in before:             # <<<<<<<<<<<<<<
15972  *                         last_pos = i
15973  *                     if pytype.name in after:
15974  */
15975         }
15976
15977         /* "lxml/objectify.pyx":976
15978  *                     if last_pos == -1 and pytype.name in before:
15979  *                         last_pos = i
15980  *                     if pytype.name in after:             # <<<<<<<<<<<<<<
15981  *                         first_pos = i+1
15982  *             if last_pos == -1:
15983  */
15984         __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)
15985         __Pyx_GOTREF(__pyx_t_6);
15986         __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)
15987         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15988         __pyx_t_11 = (__pyx_t_1 != 0);
15989         if (__pyx_t_11) {
15990
15991           /* "lxml/objectify.pyx":977
15992  *                         last_pos = i
15993  *                     if pytype.name in after:
15994  *                         first_pos = i+1             # <<<<<<<<<<<<<<
15995  *             if last_pos == -1:
15996  *                 _TYPE_CHECKS.append(entry)
15997  */
15998           __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)
15999           __Pyx_GOTREF(__pyx_t_6);
16000           __Pyx_DECREF_SET(__pyx_v_first_pos, __pyx_t_6);
16001           __pyx_t_6 = 0;
16002
16003           /* "lxml/objectify.pyx":976
16004  *                     if last_pos == -1 and pytype.name in before:
16005  *                         last_pos = i
16006  *                     if pytype.name in after:             # <<<<<<<<<<<<<<
16007  *                         first_pos = i+1
16008  *             if last_pos == -1:
16009  */
16010         }
16011
16012         /* "lxml/objectify.pyx":973
16013  *                 elif after is None:
16014  *                     after = ()
16015  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<<
16016  *                     if last_pos == -1 and pytype.name in before:
16017  *                         last_pos = i
16018  */
16019       }
16020       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16021       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16022
16023       /* "lxml/objectify.pyx":968
16024  *             first_pos = 0
16025  *             last_pos = -1
16026  *             if before or after:             # <<<<<<<<<<<<<<
16027  *                 if before is None:
16028  *                     before = ()
16029  */
16030     }
16031
16032     /* "lxml/objectify.pyx":978
16033  *                     if pytype.name in after:
16034  *                         first_pos = i+1
16035  *             if last_pos == -1:             # <<<<<<<<<<<<<<
16036  *                 _TYPE_CHECKS.append(entry)
16037  *             elif first_pos > last_pos:
16038  */
16039     __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)
16040     __Pyx_GOTREF(__pyx_t_3);
16041     __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 978, __pyx_L1_error)
16042     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16043     if (__pyx_t_11) {
16044
16045       /* "lxml/objectify.pyx":979
16046  *                         first_pos = i+1
16047  *             if last_pos == -1:
16048  *                 _TYPE_CHECKS.append(entry)             # <<<<<<<<<<<<<<
16049  *             elif first_pos > last_pos:
16050  *                 raise ValueError, u"inconsistent before/after dependencies"
16051  */
16052       if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
16053         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
16054         __PYX_ERR(0, 979, __pyx_L1_error)
16055       }
16056       __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)
16057
16058       /* "lxml/objectify.pyx":978
16059  *                     if pytype.name in after:
16060  *                         first_pos = i+1
16061  *             if last_pos == -1:             # <<<<<<<<<<<<<<
16062  *                 _TYPE_CHECKS.append(entry)
16063  *             elif first_pos > last_pos:
16064  */
16065       goto __pyx_L20;
16066     }
16067
16068     /* "lxml/objectify.pyx":980
16069  *             if last_pos == -1:
16070  *                 _TYPE_CHECKS.append(entry)
16071  *             elif first_pos > last_pos:             # <<<<<<<<<<<<<<
16072  *                 raise ValueError, u"inconsistent before/after dependencies"
16073  *             else:
16074  */
16075     __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)
16076     __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 980, __pyx_L1_error)
16077     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16078     if (unlikely(__pyx_t_11)) {
16079
16080       /* "lxml/objectify.pyx":981
16081  *                 _TYPE_CHECKS.append(entry)
16082  *             elif first_pos > last_pos:
16083  *                 raise ValueError, u"inconsistent before/after dependencies"             # <<<<<<<<<<<<<<
16084  *             else:
16085  *                 _TYPE_CHECKS.insert(last_pos, entry)
16086  */
16087       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_inconsistent_before_after_depend, 0, 0);
16088       __PYX_ERR(0, 981, __pyx_L1_error)
16089
16090       /* "lxml/objectify.pyx":980
16091  *             if last_pos == -1:
16092  *                 _TYPE_CHECKS.append(entry)
16093  *             elif first_pos > last_pos:             # <<<<<<<<<<<<<<
16094  *                 raise ValueError, u"inconsistent before/after dependencies"
16095  *             else:
16096  */
16097     }
16098
16099     /* "lxml/objectify.pyx":983
16100  *                 raise ValueError, u"inconsistent before/after dependencies"
16101  *             else:
16102  *                 _TYPE_CHECKS.insert(last_pos, entry)             # <<<<<<<<<<<<<<
16103  * 
16104  *         _PYTYPE_DICT[self.name] = self
16105  */
16106     /*else*/ {
16107       if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
16108         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert");
16109         __PYX_ERR(0, 983, __pyx_L1_error)
16110       }
16111       __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)
16112       __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)
16113     }
16114     __pyx_L20:;
16115
16116     /* "lxml/objectify.pyx":960
16117  *         if self.name == TREE_PYTYPE_NAME:
16118  *             raise ValueError, u"Cannot register tree type"
16119  *         if self.type_check is not None:             # <<<<<<<<<<<<<<
16120  *             for item in _TYPE_CHECKS:
16121  *                 if item[0] is self.type_check:
16122  */
16123   }
16124
16125   /* "lxml/objectify.pyx":985
16126  *                 _TYPE_CHECKS.insert(last_pos, entry)
16127  * 
16128  *         _PYTYPE_DICT[self.name] = self             # <<<<<<<<<<<<<<
16129  *         for xs_type in self._schema_types:
16130  *             _SCHEMA_TYPE_DICT[xs_type] = self
16131  */
16132   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
16133     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
16134     __PYX_ERR(0, 985, __pyx_L1_error)
16135   }
16136   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)
16137
16138   /* "lxml/objectify.pyx":986
16139  * 
16140  *         _PYTYPE_DICT[self.name] = self
16141  *         for xs_type in self._schema_types:             # <<<<<<<<<<<<<<
16142  *             _SCHEMA_TYPE_DICT[xs_type] = self
16143  * 
16144  */
16145   if (unlikely(__pyx_v_self->_schema_types == Py_None)) {
16146     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
16147     __PYX_ERR(0, 986, __pyx_L1_error)
16148   }
16149   __pyx_t_3 = __pyx_v_self->_schema_types; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
16150   for (;;) {
16151     if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
16152     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16153     __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)
16154     #else
16155     __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)
16156     __Pyx_GOTREF(__pyx_t_5);
16157     #endif
16158     __Pyx_XDECREF_SET(__pyx_v_xs_type, __pyx_t_5);
16159     __pyx_t_5 = 0;
16160
16161     /* "lxml/objectify.pyx":987
16162  *         _PYTYPE_DICT[self.name] = self
16163  *         for xs_type in self._schema_types:
16164  *             _SCHEMA_TYPE_DICT[xs_type] = self             # <<<<<<<<<<<<<<
16165  * 
16166  *     def unregister(self):
16167  */
16168     if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
16169       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
16170       __PYX_ERR(0, 987, __pyx_L1_error)
16171     }
16172     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)
16173
16174     /* "lxml/objectify.pyx":986
16175  * 
16176  *         _PYTYPE_DICT[self.name] = self
16177  *         for xs_type in self._schema_types:             # <<<<<<<<<<<<<<
16178  *             _SCHEMA_TYPE_DICT[xs_type] = self
16179  * 
16180  */
16181   }
16182   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16183
16184   /* "lxml/objectify.pyx":948
16185  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
16186  * 
16187  *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
16188  *         u"""register(self, before=None, after=None)
16189  * 
16190  */
16191
16192   /* function exit code */
16193   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16194   goto __pyx_L0;
16195   __pyx_L1_error:;
16196   __Pyx_XDECREF(__pyx_t_3);
16197   __Pyx_XDECREF(__pyx_t_5);
16198   __Pyx_XDECREF(__pyx_t_6);
16199   __Pyx_XDECREF(__pyx_t_7);
16200   __Pyx_XDECREF(__pyx_t_8);
16201   __Pyx_XDECREF(__pyx_t_9);
16202   __Pyx_AddTraceback("lxml.objectify.PyType.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
16203   __pyx_r = NULL;
16204   __pyx_L0:;
16205   __Pyx_XDECREF(__pyx_v_item);
16206   __Pyx_XDECREF(__pyx_v_entry);
16207   __Pyx_XDECREF(__pyx_v_first_pos);
16208   __Pyx_XDECREF(__pyx_v_last_pos);
16209   __Pyx_XDECREF(__pyx_v_i);
16210   __Pyx_XDECREF(__pyx_v_check);
16211   __Pyx_XDECREF(__pyx_v_pytype);
16212   __Pyx_XDECREF(__pyx_v_xs_type);
16213   __Pyx_XDECREF(__pyx_v_before);
16214   __Pyx_XDECREF(__pyx_v_after);
16215   __Pyx_XGIVEREF(__pyx_r);
16216   __Pyx_RefNannyFinishContext();
16217   return __pyx_r;
16218 }
16219
16220 /* "lxml/objectify.pyx":989
16221  *             _SCHEMA_TYPE_DICT[xs_type] = self
16222  * 
16223  *     def unregister(self):             # <<<<<<<<<<<<<<
16224  *         u"unregister(self)"
16225  *         if _PYTYPE_DICT.get(self.name) is self:
16226  */
16227
16228 /* Python wrapper */
16229 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_7unregister(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
16230 static char __pyx_doc_4lxml_9objectify_6PyType_6unregister[] = "unregister(self)";
16231 static PyMethodDef __pyx_mdef_4lxml_9objectify_6PyType_7unregister = {"unregister", (PyCFunction)__pyx_pw_4lxml_9objectify_6PyType_7unregister, METH_NOARGS, __pyx_doc_4lxml_9objectify_6PyType_6unregister};
16232 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_7unregister(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
16233   PyObject *__pyx_r = 0;
16234   __Pyx_RefNannyDeclarations
16235   __Pyx_RefNannySetupContext("unregister (wrapper)", 0);
16236   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_6unregister(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16237
16238   /* function exit code */
16239   __Pyx_RefNannyFinishContext();
16240   return __pyx_r;
16241 }
16242
16243 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16244   PyObject *__pyx_v_xs_type = NULL;
16245   PyObject *__pyx_v_pytype = NULL;
16246   PyObject *__pyx_r = NULL;
16247   __Pyx_RefNannyDeclarations
16248   PyObject *__pyx_t_1 = NULL;
16249   int __pyx_t_2;
16250   int __pyx_t_3;
16251   PyObject *__pyx_t_4 = NULL;
16252   Py_ssize_t __pyx_t_5;
16253   PyObject *__pyx_t_6 = NULL;
16254   PyObject *__pyx_t_7 = NULL;
16255   PyObject *__pyx_t_8 = NULL;
16256   PyObject *(*__pyx_t_9)(PyObject *);
16257   PyObject *__pyx_t_10 = NULL;
16258   PyObject *__pyx_t_11 = NULL;
16259   PyObject *__pyx_t_12 = NULL;
16260   int __pyx_t_13;
16261   int __pyx_lineno = 0;
16262   const char *__pyx_filename = NULL;
16263   int __pyx_clineno = 0;
16264   __Pyx_RefNannySetupContext("unregister", 0);
16265
16266   /* "lxml/objectify.pyx":991
16267  *     def unregister(self):
16268  *         u"unregister(self)"
16269  *         if _PYTYPE_DICT.get(self.name) is self:             # <<<<<<<<<<<<<<
16270  *             del _PYTYPE_DICT[self.name]
16271  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16272  */
16273   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
16274     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
16275     __PYX_ERR(0, 991, __pyx_L1_error)
16276   }
16277   __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)
16278   __Pyx_GOTREF(__pyx_t_1);
16279   __pyx_t_2 = (__pyx_t_1 == ((PyObject *)__pyx_v_self));
16280   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16281   __pyx_t_3 = (__pyx_t_2 != 0);
16282   if (__pyx_t_3) {
16283
16284     /* "lxml/objectify.pyx":992
16285  *         u"unregister(self)"
16286  *         if _PYTYPE_DICT.get(self.name) is self:
16287  *             del _PYTYPE_DICT[self.name]             # <<<<<<<<<<<<<<
16288  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16289  *             if pytype is self:
16290  */
16291     if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
16292       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
16293       __PYX_ERR(0, 992, __pyx_L1_error)
16294     }
16295     if (unlikely(PyDict_DelItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name) < 0)) __PYX_ERR(0, 992, __pyx_L1_error)
16296
16297     /* "lxml/objectify.pyx":991
16298  *     def unregister(self):
16299  *         u"unregister(self)"
16300  *         if _PYTYPE_DICT.get(self.name) is self:             # <<<<<<<<<<<<<<
16301  *             del _PYTYPE_DICT[self.name]
16302  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16303  */
16304   }
16305
16306   /* "lxml/objectify.pyx":993
16307  *         if _PYTYPE_DICT.get(self.name) is self:
16308  *             del _PYTYPE_DICT[self.name]
16309  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):             # <<<<<<<<<<<<<<
16310  *             if pytype is self:
16311  *                 del _SCHEMA_TYPE_DICT[xs_type]
16312  */
16313   if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
16314     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
16315     __PYX_ERR(0, 993, __pyx_L1_error)
16316   }
16317   __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)
16318   __Pyx_GOTREF(__pyx_t_1);
16319   __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L1_error)
16320   __Pyx_GOTREF(__pyx_t_4);
16321   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16322   __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
16323   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16324   for (;;) {
16325     if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
16326     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16327     __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)
16328     #else
16329     __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)
16330     __Pyx_GOTREF(__pyx_t_4);
16331     #endif
16332     if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
16333       PyObject* sequence = __pyx_t_4;
16334       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
16335       if (unlikely(size != 2)) {
16336         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
16337         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
16338         __PYX_ERR(0, 993, __pyx_L1_error)
16339       }
16340       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16341       if (likely(PyTuple_CheckExact(sequence))) {
16342         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
16343         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
16344       } else {
16345         __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
16346         __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
16347       }
16348       __Pyx_INCREF(__pyx_t_6);
16349       __Pyx_INCREF(__pyx_t_7);
16350       #else
16351       __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 993, __pyx_L1_error)
16352       __Pyx_GOTREF(__pyx_t_6);
16353       __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 993, __pyx_L1_error)
16354       __Pyx_GOTREF(__pyx_t_7);
16355       #endif
16356       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16357     } else {
16358       Py_ssize_t index = -1;
16359       __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 993, __pyx_L1_error)
16360       __Pyx_GOTREF(__pyx_t_8);
16361       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16362       __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
16363       index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
16364       __Pyx_GOTREF(__pyx_t_6);
16365       index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
16366       __Pyx_GOTREF(__pyx_t_7);
16367       if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 993, __pyx_L1_error)
16368       __pyx_t_9 = NULL;
16369       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16370       goto __pyx_L7_unpacking_done;
16371       __pyx_L6_unpacking_failed:;
16372       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16373       __pyx_t_9 = NULL;
16374       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
16375       __PYX_ERR(0, 993, __pyx_L1_error)
16376       __pyx_L7_unpacking_done:;
16377     }
16378     __Pyx_XDECREF_SET(__pyx_v_xs_type, __pyx_t_6);
16379     __pyx_t_6 = 0;
16380     __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_7);
16381     __pyx_t_7 = 0;
16382
16383     /* "lxml/objectify.pyx":994
16384  *             del _PYTYPE_DICT[self.name]
16385  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16386  *             if pytype is self:             # <<<<<<<<<<<<<<
16387  *                 del _SCHEMA_TYPE_DICT[xs_type]
16388  *         if self.type_check is None:
16389  */
16390     __pyx_t_3 = (__pyx_v_pytype == ((PyObject *)__pyx_v_self));
16391     __pyx_t_2 = (__pyx_t_3 != 0);
16392     if (__pyx_t_2) {
16393
16394       /* "lxml/objectify.pyx":995
16395  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16396  *             if pytype is self:
16397  *                 del _SCHEMA_TYPE_DICT[xs_type]             # <<<<<<<<<<<<<<
16398  *         if self.type_check is None:
16399  *             return
16400  */
16401       if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
16402         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
16403         __PYX_ERR(0, 995, __pyx_L1_error)
16404       }
16405       if (unlikely(PyDict_DelItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_xs_type) < 0)) __PYX_ERR(0, 995, __pyx_L1_error)
16406
16407       /* "lxml/objectify.pyx":994
16408  *             del _PYTYPE_DICT[self.name]
16409  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16410  *             if pytype is self:             # <<<<<<<<<<<<<<
16411  *                 del _SCHEMA_TYPE_DICT[xs_type]
16412  *         if self.type_check is None:
16413  */
16414     }
16415
16416     /* "lxml/objectify.pyx":993
16417  *         if _PYTYPE_DICT.get(self.name) is self:
16418  *             del _PYTYPE_DICT[self.name]
16419  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):             # <<<<<<<<<<<<<<
16420  *             if pytype is self:
16421  *                 del _SCHEMA_TYPE_DICT[xs_type]
16422  */
16423   }
16424   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16425
16426   /* "lxml/objectify.pyx":996
16427  *             if pytype is self:
16428  *                 del _SCHEMA_TYPE_DICT[xs_type]
16429  *         if self.type_check is None:             # <<<<<<<<<<<<<<
16430  *             return
16431  *         try:
16432  */
16433   __pyx_t_2 = (__pyx_v_self->type_check == Py_None);
16434   __pyx_t_3 = (__pyx_t_2 != 0);
16435   if (__pyx_t_3) {
16436
16437     /* "lxml/objectify.pyx":997
16438  *                 del _SCHEMA_TYPE_DICT[xs_type]
16439  *         if self.type_check is None:
16440  *             return             # <<<<<<<<<<<<<<
16441  *         try:
16442  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16443  */
16444     __Pyx_XDECREF(__pyx_r);
16445     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16446     goto __pyx_L0;
16447
16448     /* "lxml/objectify.pyx":996
16449  *             if pytype is self:
16450  *                 del _SCHEMA_TYPE_DICT[xs_type]
16451  *         if self.type_check is None:             # <<<<<<<<<<<<<<
16452  *             return
16453  *         try:
16454  */
16455   }
16456
16457   /* "lxml/objectify.pyx":998
16458  *         if self.type_check is None:
16459  *             return
16460  *         try:             # <<<<<<<<<<<<<<
16461  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16462  *         except ValueError:
16463  */
16464   {
16465     __Pyx_PyThreadState_declare
16466     __Pyx_PyThreadState_assign
16467     __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
16468     __Pyx_XGOTREF(__pyx_t_10);
16469     __Pyx_XGOTREF(__pyx_t_11);
16470     __Pyx_XGOTREF(__pyx_t_12);
16471     /*try:*/ {
16472
16473       /* "lxml/objectify.pyx":999
16474  *             return
16475  *         try:
16476  *             _TYPE_CHECKS.remove( (self.type_check, self) )             # <<<<<<<<<<<<<<
16477  *         except ValueError:
16478  *             pass
16479  */
16480       __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L10_error)
16481       __Pyx_GOTREF(__pyx_t_1);
16482       __Pyx_INCREF(__pyx_v_self->type_check);
16483       __Pyx_GIVEREF(__pyx_v_self->type_check);
16484       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->type_check);
16485       __Pyx_INCREF(((PyObject *)__pyx_v_self));
16486       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
16487       PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
16488       __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)
16489       __Pyx_GOTREF(__pyx_t_4);
16490       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16491       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16492
16493       /* "lxml/objectify.pyx":998
16494  *         if self.type_check is None:
16495  *             return
16496  *         try:             # <<<<<<<<<<<<<<
16497  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16498  *         except ValueError:
16499  */
16500     }
16501     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16502     __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
16503     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
16504     goto __pyx_L15_try_end;
16505     __pyx_L10_error:;
16506     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16507     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16508     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16509     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16510     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
16511
16512     /* "lxml/objectify.pyx":1000
16513  *         try:
16514  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16515  *         except ValueError:             # <<<<<<<<<<<<<<
16516  *             pass
16517  * 
16518  */
16519     __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
16520     if (__pyx_t_13) {
16521       __Pyx_ErrRestore(0,0,0);
16522       goto __pyx_L11_exception_handled;
16523     }
16524     goto __pyx_L12_except_error;
16525     __pyx_L12_except_error:;
16526
16527     /* "lxml/objectify.pyx":998
16528  *         if self.type_check is None:
16529  *             return
16530  *         try:             # <<<<<<<<<<<<<<
16531  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16532  *         except ValueError:
16533  */
16534     __Pyx_XGIVEREF(__pyx_t_10);
16535     __Pyx_XGIVEREF(__pyx_t_11);
16536     __Pyx_XGIVEREF(__pyx_t_12);
16537     __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
16538     goto __pyx_L1_error;
16539     __pyx_L11_exception_handled:;
16540     __Pyx_XGIVEREF(__pyx_t_10);
16541     __Pyx_XGIVEREF(__pyx_t_11);
16542     __Pyx_XGIVEREF(__pyx_t_12);
16543     __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
16544     __pyx_L15_try_end:;
16545   }
16546
16547   /* "lxml/objectify.pyx":989
16548  *             _SCHEMA_TYPE_DICT[xs_type] = self
16549  * 
16550  *     def unregister(self):             # <<<<<<<<<<<<<<
16551  *         u"unregister(self)"
16552  *         if _PYTYPE_DICT.get(self.name) is self:
16553  */
16554
16555   /* function exit code */
16556   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16557   goto __pyx_L0;
16558   __pyx_L1_error:;
16559   __Pyx_XDECREF(__pyx_t_1);
16560   __Pyx_XDECREF(__pyx_t_4);
16561   __Pyx_XDECREF(__pyx_t_6);
16562   __Pyx_XDECREF(__pyx_t_7);
16563   __Pyx_XDECREF(__pyx_t_8);
16564   __Pyx_AddTraceback("lxml.objectify.PyType.unregister", __pyx_clineno, __pyx_lineno, __pyx_filename);
16565   __pyx_r = NULL;
16566   __pyx_L0:;
16567   __Pyx_XDECREF(__pyx_v_xs_type);
16568   __Pyx_XDECREF(__pyx_v_pytype);
16569   __Pyx_XGIVEREF(__pyx_r);
16570   __Pyx_RefNannyFinishContext();
16571   return __pyx_r;
16572 }
16573
16574 /* "lxml/objectify.pyx":1008
16575  *         Note that this must be set before registering the type!
16576  *         """
16577  *         def __get__(self):             # <<<<<<<<<<<<<<
16578  *             return self._schema_types
16579  *         def __set__(self, types):
16580  */
16581
16582 /* Python wrapper */
16583 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
16584 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_1__get__(PyObject *__pyx_v_self) {
16585   PyObject *__pyx_r = 0;
16586   __Pyx_RefNannyDeclarations
16587   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16588   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16589
16590   /* function exit code */
16591   __Pyx_RefNannyFinishContext();
16592   return __pyx_r;
16593 }
16594
16595 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16596   PyObject *__pyx_r = NULL;
16597   __Pyx_RefNannyDeclarations
16598   __Pyx_RefNannySetupContext("__get__", 0);
16599
16600   /* "lxml/objectify.pyx":1009
16601  *         """
16602  *         def __get__(self):
16603  *             return self._schema_types             # <<<<<<<<<<<<<<
16604  *         def __set__(self, types):
16605  *             self._schema_types = list(map(unicode, types))
16606  */
16607   __Pyx_XDECREF(__pyx_r);
16608   __Pyx_INCREF(__pyx_v_self->_schema_types);
16609   __pyx_r = __pyx_v_self->_schema_types;
16610   goto __pyx_L0;
16611
16612   /* "lxml/objectify.pyx":1008
16613  *         Note that this must be set before registering the type!
16614  *         """
16615  *         def __get__(self):             # <<<<<<<<<<<<<<
16616  *             return self._schema_types
16617  *         def __set__(self, types):
16618  */
16619
16620   /* function exit code */
16621   __pyx_L0:;
16622   __Pyx_XGIVEREF(__pyx_r);
16623   __Pyx_RefNannyFinishContext();
16624   return __pyx_r;
16625 }
16626
16627 /* "lxml/objectify.pyx":1010
16628  *         def __get__(self):
16629  *             return self._schema_types
16630  *         def __set__(self, types):             # <<<<<<<<<<<<<<
16631  *             self._schema_types = list(map(unicode, types))
16632  * 
16633  */
16634
16635 /* Python wrapper */
16636 static int __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types); /*proto*/
16637 static int __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types) {
16638   int __pyx_r;
16639   __Pyx_RefNannyDeclarations
16640   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
16641   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self), ((PyObject *)__pyx_v_types));
16642
16643   /* function exit code */
16644   __Pyx_RefNannyFinishContext();
16645   return __pyx_r;
16646 }
16647
16648 static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_types) {
16649   int __pyx_r;
16650   __Pyx_RefNannyDeclarations
16651   PyObject *__pyx_t_1 = NULL;
16652   PyObject *__pyx_t_2 = NULL;
16653   int __pyx_lineno = 0;
16654   const char *__pyx_filename = NULL;
16655   int __pyx_clineno = 0;
16656   __Pyx_RefNannySetupContext("__set__", 0);
16657
16658   /* "lxml/objectify.pyx":1011
16659  *             return self._schema_types
16660  *         def __set__(self, types):
16661  *             self._schema_types = list(map(unicode, types))             # <<<<<<<<<<<<<<
16662  * 
16663  * 
16664  */
16665   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
16666   __Pyx_GOTREF(__pyx_t_1);
16667   __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
16668   __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
16669   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyUnicode_Type)));
16670   __Pyx_INCREF(__pyx_v_types);
16671   __Pyx_GIVEREF(__pyx_v_types);
16672   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_types);
16673   __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)
16674   __Pyx_GOTREF(__pyx_t_2);
16675   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16676   __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
16677   __Pyx_GOTREF(__pyx_t_1);
16678   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16679   __Pyx_GIVEREF(__pyx_t_1);
16680   __Pyx_GOTREF(__pyx_v_self->_schema_types);
16681   __Pyx_DECREF(__pyx_v_self->_schema_types);
16682   __pyx_v_self->_schema_types = ((PyObject*)__pyx_t_1);
16683   __pyx_t_1 = 0;
16684
16685   /* "lxml/objectify.pyx":1010
16686  *         def __get__(self):
16687  *             return self._schema_types
16688  *         def __set__(self, types):             # <<<<<<<<<<<<<<
16689  *             self._schema_types = list(map(unicode, types))
16690  * 
16691  */
16692
16693   /* function exit code */
16694   __pyx_r = 0;
16695   goto __pyx_L0;
16696   __pyx_L1_error:;
16697   __Pyx_XDECREF(__pyx_t_1);
16698   __Pyx_XDECREF(__pyx_t_2);
16699   __Pyx_AddTraceback("lxml.objectify.PyType.xmlSchemaTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16700   __pyx_r = -1;
16701   __pyx_L0:;
16702   __Pyx_RefNannyFinishContext();
16703   return __pyx_r;
16704 }
16705
16706 /* "lxml/objectify.pyx":921
16707  *     matching type will be used.
16708  *     """
16709  *     cdef readonly object name             # <<<<<<<<<<<<<<
16710  *     cdef readonly object type_check
16711  *     cdef readonly object stringify
16712  */
16713
16714 /* Python wrapper */
16715 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
16716 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_4name_1__get__(PyObject *__pyx_v_self) {
16717   PyObject *__pyx_r = 0;
16718   __Pyx_RefNannyDeclarations
16719   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16720   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_4name___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16721
16722   /* function exit code */
16723   __Pyx_RefNannyFinishContext();
16724   return __pyx_r;
16725 }
16726
16727 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4name___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16728   PyObject *__pyx_r = NULL;
16729   __Pyx_RefNannyDeclarations
16730   __Pyx_RefNannySetupContext("__get__", 0);
16731   __Pyx_XDECREF(__pyx_r);
16732   __Pyx_INCREF(__pyx_v_self->name);
16733   __pyx_r = __pyx_v_self->name;
16734   goto __pyx_L0;
16735
16736   /* function exit code */
16737   __pyx_L0:;
16738   __Pyx_XGIVEREF(__pyx_r);
16739   __Pyx_RefNannyFinishContext();
16740   return __pyx_r;
16741 }
16742
16743 /* "lxml/objectify.pyx":922
16744  *     """
16745  *     cdef readonly object name
16746  *     cdef readonly object type_check             # <<<<<<<<<<<<<<
16747  *     cdef readonly object stringify
16748  *     cdef object _type
16749  */
16750
16751 /* Python wrapper */
16752 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_10type_check_1__get__(PyObject *__pyx_v_self); /*proto*/
16753 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_10type_check_1__get__(PyObject *__pyx_v_self) {
16754   PyObject *__pyx_r = 0;
16755   __Pyx_RefNannyDeclarations
16756   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16757   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_10type_check___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16758
16759   /* function exit code */
16760   __Pyx_RefNannyFinishContext();
16761   return __pyx_r;
16762 }
16763
16764 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_10type_check___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16765   PyObject *__pyx_r = NULL;
16766   __Pyx_RefNannyDeclarations
16767   __Pyx_RefNannySetupContext("__get__", 0);
16768   __Pyx_XDECREF(__pyx_r);
16769   __Pyx_INCREF(__pyx_v_self->type_check);
16770   __pyx_r = __pyx_v_self->type_check;
16771   goto __pyx_L0;
16772
16773   /* function exit code */
16774   __pyx_L0:;
16775   __Pyx_XGIVEREF(__pyx_r);
16776   __Pyx_RefNannyFinishContext();
16777   return __pyx_r;
16778 }
16779
16780 /* "lxml/objectify.pyx":923
16781  *     cdef readonly object name
16782  *     cdef readonly object type_check
16783  *     cdef readonly object stringify             # <<<<<<<<<<<<<<
16784  *     cdef object _type
16785  *     cdef list _schema_types
16786  */
16787
16788 /* Python wrapper */
16789 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_9stringify_1__get__(PyObject *__pyx_v_self); /*proto*/
16790 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_9stringify_1__get__(PyObject *__pyx_v_self) {
16791   PyObject *__pyx_r = 0;
16792   __Pyx_RefNannyDeclarations
16793   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16794   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_9stringify___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16795
16796   /* function exit code */
16797   __Pyx_RefNannyFinishContext();
16798   return __pyx_r;
16799 }
16800
16801 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_9stringify___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16802   PyObject *__pyx_r = NULL;
16803   __Pyx_RefNannyDeclarations
16804   __Pyx_RefNannySetupContext("__get__", 0);
16805   __Pyx_XDECREF(__pyx_r);
16806   __Pyx_INCREF(__pyx_v_self->stringify);
16807   __pyx_r = __pyx_v_self->stringify;
16808   goto __pyx_L0;
16809
16810   /* function exit code */
16811   __pyx_L0:;
16812   __Pyx_XGIVEREF(__pyx_r);
16813   __Pyx_RefNannyFinishContext();
16814   return __pyx_r;
16815 }
16816
16817 /* "lxml/objectify.pyx":1018
16818  * cdef list _TYPE_CHECKS = []
16819  * 
16820  * def __lower_bool(b):             # <<<<<<<<<<<<<<
16821  *     return u"true" if b else u"false"
16822  * 
16823  */
16824
16825 /* Python wrapper */
16826 static PyObject *__pyx_pw_4lxml_9objectify_7__lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
16827 static PyMethodDef __pyx_mdef_4lxml_9objectify_7__lower_bool = {"__lower_bool", (PyCFunction)__pyx_pw_4lxml_9objectify_7__lower_bool, METH_O, 0};
16828 static PyObject *__pyx_pw_4lxml_9objectify_7__lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b) {
16829   PyObject *__pyx_r = 0;
16830   __Pyx_RefNannyDeclarations
16831   __Pyx_RefNannySetupContext("__lower_bool (wrapper)", 0);
16832   __pyx_r = __pyx_pf_4lxml_9objectify_6__lower_bool(__pyx_self, ((PyObject *)__pyx_v_b));
16833
16834   /* function exit code */
16835   __Pyx_RefNannyFinishContext();
16836   return __pyx_r;
16837 }
16838
16839 static PyObject *__pyx_pf_4lxml_9objectify_6__lower_bool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b) {
16840   PyObject *__pyx_r = NULL;
16841   __Pyx_RefNannyDeclarations
16842   PyObject *__pyx_t_1 = NULL;
16843   int __pyx_t_2;
16844   int __pyx_lineno = 0;
16845   const char *__pyx_filename = NULL;
16846   int __pyx_clineno = 0;
16847   __Pyx_RefNannySetupContext("__lower_bool", 0);
16848
16849   /* "lxml/objectify.pyx":1019
16850  * 
16851  * def __lower_bool(b):
16852  *     return u"true" if b else u"false"             # <<<<<<<<<<<<<<
16853  * 
16854  * cdef _pytypename(obj):
16855  */
16856   __Pyx_XDECREF(__pyx_r);
16857   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1019, __pyx_L1_error)
16858   if (__pyx_t_2) {
16859     __Pyx_INCREF(__pyx_n_u_true);
16860     __pyx_t_1 = __pyx_n_u_true;
16861   } else {
16862     __Pyx_INCREF(__pyx_n_u_false);
16863     __pyx_t_1 = __pyx_n_u_false;
16864   }
16865   __pyx_r = __pyx_t_1;
16866   __pyx_t_1 = 0;
16867   goto __pyx_L0;
16868
16869   /* "lxml/objectify.pyx":1018
16870  * cdef list _TYPE_CHECKS = []
16871  * 
16872  * def __lower_bool(b):             # <<<<<<<<<<<<<<
16873  *     return u"true" if b else u"false"
16874  * 
16875  */
16876
16877   /* function exit code */
16878   __pyx_L1_error:;
16879   __Pyx_XDECREF(__pyx_t_1);
16880   __Pyx_AddTraceback("lxml.objectify.__lower_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
16881   __pyx_r = NULL;
16882   __pyx_L0:;
16883   __Pyx_XGIVEREF(__pyx_r);
16884   __Pyx_RefNannyFinishContext();
16885   return __pyx_r;
16886 }
16887
16888 /* "lxml/objectify.pyx":1021
16889  *     return u"true" if b else u"false"
16890  * 
16891  * cdef _pytypename(obj):             # <<<<<<<<<<<<<<
16892  *     return u"str" if python._isString(obj) else _typename(obj)
16893  * 
16894  */
16895
16896 static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) {
16897   PyObject *__pyx_r = NULL;
16898   __Pyx_RefNannyDeclarations
16899   PyObject *__pyx_t_1 = NULL;
16900   PyObject *__pyx_t_2 = NULL;
16901   int __pyx_lineno = 0;
16902   const char *__pyx_filename = NULL;
16903   int __pyx_clineno = 0;
16904   __Pyx_RefNannySetupContext("_pytypename", 0);
16905
16906   /* "lxml/objectify.pyx":1022
16907  * 
16908  * cdef _pytypename(obj):
16909  *     return u"str" if python._isString(obj) else _typename(obj)             # <<<<<<<<<<<<<<
16910  * 
16911  * def pytypename(obj):
16912  */
16913   __Pyx_XDECREF(__pyx_r);
16914   if ((_isString(__pyx_v_obj) != 0)) {
16915     __Pyx_INCREF(__pyx_n_u_str);
16916     __pyx_t_1 = __pyx_n_u_str;
16917   } else {
16918     __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(__pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error)
16919     __Pyx_GOTREF(__pyx_t_2);
16920     __pyx_t_1 = __pyx_t_2;
16921     __pyx_t_2 = 0;
16922   }
16923   __pyx_r = __pyx_t_1;
16924   __pyx_t_1 = 0;
16925   goto __pyx_L0;
16926
16927   /* "lxml/objectify.pyx":1021
16928  *     return u"true" if b else u"false"
16929  * 
16930  * cdef _pytypename(obj):             # <<<<<<<<<<<<<<
16931  *     return u"str" if python._isString(obj) else _typename(obj)
16932  * 
16933  */
16934
16935   /* function exit code */
16936   __pyx_L1_error:;
16937   __Pyx_XDECREF(__pyx_t_1);
16938   __Pyx_XDECREF(__pyx_t_2);
16939   __Pyx_AddTraceback("lxml.objectify._pytypename", __pyx_clineno, __pyx_lineno, __pyx_filename);
16940   __pyx_r = 0;
16941   __pyx_L0:;
16942   __Pyx_XGIVEREF(__pyx_r);
16943   __Pyx_RefNannyFinishContext();
16944   return __pyx_r;
16945 }
16946
16947 /* "lxml/objectify.pyx":1024
16948  *     return u"str" if python._isString(obj) else _typename(obj)
16949  * 
16950  * def pytypename(obj):             # <<<<<<<<<<<<<<
16951  *     u"""pytypename(obj)
16952  * 
16953  */
16954
16955 /* Python wrapper */
16956 static PyObject *__pyx_pw_4lxml_9objectify_9pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16957 static char __pyx_doc_4lxml_9objectify_8pytypename[] = "pytypename(obj)\n\n    Find the name of the corresponding PyType for a Python object.\n    ";
16958 static PyMethodDef __pyx_mdef_4lxml_9objectify_9pytypename = {"pytypename", (PyCFunction)__pyx_pw_4lxml_9objectify_9pytypename, METH_O, __pyx_doc_4lxml_9objectify_8pytypename};
16959 static PyObject *__pyx_pw_4lxml_9objectify_9pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16960   PyObject *__pyx_r = 0;
16961   __Pyx_RefNannyDeclarations
16962   __Pyx_RefNannySetupContext("pytypename (wrapper)", 0);
16963   __pyx_r = __pyx_pf_4lxml_9objectify_8pytypename(__pyx_self, ((PyObject *)__pyx_v_obj));
16964
16965   /* function exit code */
16966   __Pyx_RefNannyFinishContext();
16967   return __pyx_r;
16968 }
16969
16970 static PyObject *__pyx_pf_4lxml_9objectify_8pytypename(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16971   PyObject *__pyx_r = NULL;
16972   __Pyx_RefNannyDeclarations
16973   PyObject *__pyx_t_1 = NULL;
16974   int __pyx_lineno = 0;
16975   const char *__pyx_filename = NULL;
16976   int __pyx_clineno = 0;
16977   __Pyx_RefNannySetupContext("pytypename", 0);
16978
16979   /* "lxml/objectify.pyx":1029
16980  *     Find the name of the corresponding PyType for a Python object.
16981  *     """
16982  *     return _pytypename(obj)             # <<<<<<<<<<<<<<
16983  * 
16984  * cdef _registerPyTypes():
16985  */
16986   __Pyx_XDECREF(__pyx_r);
16987   __pyx_t_1 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
16988   __Pyx_GOTREF(__pyx_t_1);
16989   __pyx_r = __pyx_t_1;
16990   __pyx_t_1 = 0;
16991   goto __pyx_L0;
16992
16993   /* "lxml/objectify.pyx":1024
16994  *     return u"str" if python._isString(obj) else _typename(obj)
16995  * 
16996  * def pytypename(obj):             # <<<<<<<<<<<<<<
16997  *     u"""pytypename(obj)
16998  * 
16999  */
17000
17001   /* function exit code */
17002   __pyx_L1_error:;
17003   __Pyx_XDECREF(__pyx_t_1);
17004   __Pyx_AddTraceback("lxml.objectify.pytypename", __pyx_clineno, __pyx_lineno, __pyx_filename);
17005   __pyx_r = NULL;
17006   __pyx_L0:;
17007   __Pyx_XGIVEREF(__pyx_r);
17008   __Pyx_RefNannyFinishContext();
17009   return __pyx_r;
17010 }
17011
17012 /* "lxml/objectify.pyx":1031
17013  *     return _pytypename(obj)
17014  * 
17015  * cdef _registerPyTypes():             # <<<<<<<<<<<<<<
17016  *     pytype = PyType(u'int', int, IntElement)
17017  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
17018  */
17019
17020 static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) {
17021   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype = NULL;
17022   PyObject *__pyx_r = NULL;
17023   __Pyx_RefNannyDeclarations
17024   PyObject *__pyx_t_1 = NULL;
17025   PyObject *__pyx_t_2 = NULL;
17026   PyObject *__pyx_t_3 = NULL;
17027   int __pyx_lineno = 0;
17028   const char *__pyx_filename = NULL;
17029   int __pyx_clineno = 0;
17030   __Pyx_RefNannySetupContext("_registerPyTypes", 0);
17031
17032   /* "lxml/objectify.pyx":1032
17033  * 
17034  * cdef _registerPyTypes():
17035  *     pytype = PyType(u'int', int, IntElement)             # <<<<<<<<<<<<<<
17036  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
17037  *                              u"unsignedByte", u"nonPositiveInteger",
17038  */
17039   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error)
17040   __Pyx_GOTREF(__pyx_t_1);
17041   __Pyx_INCREF(__pyx_n_u_int);
17042   __Pyx_GIVEREF(__pyx_n_u_int);
17043   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_int);
17044   __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
17045   __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
17046   PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)(&PyInt_Type)));
17047   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17048   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17049   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17050   __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)
17051   __Pyx_GOTREF(__pyx_t_2);
17052   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17053   __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
17054   __pyx_t_2 = 0;
17055
17056   /* "lxml/objectify.pyx":1033
17057  * cdef _registerPyTypes():
17058  *     pytype = PyType(u'int', int, IntElement)
17059  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",             # <<<<<<<<<<<<<<
17060  *                              u"unsignedByte", u"nonPositiveInteger",
17061  *                              u"negativeInteger", u"long", u"nonNegativeInteger",
17062  */
17063   if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__5) < 0) __PYX_ERR(0, 1033, __pyx_L1_error)
17064
17065   /* "lxml/objectify.pyx":1037
17066  *                              u"negativeInteger", u"long", u"nonNegativeInteger",
17067  *                              u"unsignedLong", u"unsignedInt", u"positiveInteger",)
17068  *     pytype.register()             # <<<<<<<<<<<<<<
17069  * 
17070  *     # 'long' type just for backwards compatibility
17071  */
17072   __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)
17073   __Pyx_GOTREF(__pyx_t_1);
17074   __pyx_t_3 = NULL;
17075   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
17076     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
17077     if (likely(__pyx_t_3)) {
17078       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
17079       __Pyx_INCREF(__pyx_t_3);
17080       __Pyx_INCREF(function);
17081       __Pyx_DECREF_SET(__pyx_t_1, function);
17082     }
17083   }
17084   __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
17085   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17086   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error)
17087   __Pyx_GOTREF(__pyx_t_2);
17088   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17089   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17090
17091   /* "lxml/objectify.pyx":1040
17092  * 
17093  *     # 'long' type just for backwards compatibility
17094  *     pytype = PyType(u'long', None, IntElement)             # <<<<<<<<<<<<<<
17095  *     pytype.register()
17096  * 
17097  */
17098   __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
17099   __Pyx_GOTREF(__pyx_t_2);
17100   __Pyx_INCREF(__pyx_n_u_long);
17101   __Pyx_GIVEREF(__pyx_n_u_long);
17102   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_long);
17103   __Pyx_INCREF(Py_None);
17104   __Pyx_GIVEREF(Py_None);
17105   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
17106   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17107   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17108   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17109   __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)
17110   __Pyx_GOTREF(__pyx_t_1);
17111   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17112   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1));
17113   __pyx_t_1 = 0;
17114
17115   /* "lxml/objectify.pyx":1041
17116  *     # 'long' type just for backwards compatibility
17117  *     pytype = PyType(u'long', None, IntElement)
17118  *     pytype.register()             # <<<<<<<<<<<<<<
17119  * 
17120  *     pytype = PyType(u'float', float, FloatElement, repr)
17121  */
17122   __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)
17123   __Pyx_GOTREF(__pyx_t_2);
17124   __pyx_t_3 = NULL;
17125   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
17126     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
17127     if (likely(__pyx_t_3)) {
17128       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17129       __Pyx_INCREF(__pyx_t_3);
17130       __Pyx_INCREF(function);
17131       __Pyx_DECREF_SET(__pyx_t_2, function);
17132     }
17133   }
17134   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
17135   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17136   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error)
17137   __Pyx_GOTREF(__pyx_t_1);
17138   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17139   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17140
17141   /* "lxml/objectify.pyx":1043
17142  *     pytype.register()
17143  * 
17144  *     pytype = PyType(u'float', float, FloatElement, repr)             # <<<<<<<<<<<<<<
17145  *     pytype.xmlSchemaTypes = (u"double", u"float")
17146  *     pytype.register()
17147  */
17148   __pyx_t_1 = __Pyx_GetBuiltinName(__pyx_n_s_repr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
17149   __Pyx_GOTREF(__pyx_t_1);
17150   __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
17151   __Pyx_GOTREF(__pyx_t_2);
17152   __Pyx_INCREF(__pyx_n_u_float);
17153   __Pyx_GIVEREF(__pyx_n_u_float);
17154   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_float);
17155   __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
17156   __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
17157   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)(&PyFloat_Type)));
17158   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_FloatElement));
17159   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_FloatElement));
17160   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_FloatElement));
17161   __Pyx_GIVEREF(__pyx_t_1);
17162   PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
17163   __pyx_t_1 = 0;
17164   __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)
17165   __Pyx_GOTREF(__pyx_t_1);
17166   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17167   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1));
17168   __pyx_t_1 = 0;
17169
17170   /* "lxml/objectify.pyx":1044
17171  * 
17172  *     pytype = PyType(u'float', float, FloatElement, repr)
17173  *     pytype.xmlSchemaTypes = (u"double", u"float")             # <<<<<<<<<<<<<<
17174  *     pytype.register()
17175  * 
17176  */
17177   if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__6) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
17178
17179   /* "lxml/objectify.pyx":1045
17180  *     pytype = PyType(u'float', float, FloatElement, repr)
17181  *     pytype.xmlSchemaTypes = (u"double", u"float")
17182  *     pytype.register()             # <<<<<<<<<<<<<<
17183  * 
17184  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
17185  */
17186   __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)
17187   __Pyx_GOTREF(__pyx_t_2);
17188   __pyx_t_3 = NULL;
17189   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
17190     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
17191     if (likely(__pyx_t_3)) {
17192       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17193       __Pyx_INCREF(__pyx_t_3);
17194       __Pyx_INCREF(function);
17195       __Pyx_DECREF_SET(__pyx_t_2, function);
17196     }
17197   }
17198   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
17199   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17200   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error)
17201   __Pyx_GOTREF(__pyx_t_1);
17202   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17203   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17204
17205   /* "lxml/objectify.pyx":1047
17206  *     pytype.register()
17207  * 
17208  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)             # <<<<<<<<<<<<<<
17209  *     pytype.xmlSchemaTypes = (u"boolean",)
17210  *     pytype.register()
17211  */
17212   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_checkBool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
17213   __Pyx_GOTREF(__pyx_t_1);
17214   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_lower_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __pyx_L1_error)
17215   __Pyx_GOTREF(__pyx_t_2);
17216   __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1047, __pyx_L1_error)
17217   __Pyx_GOTREF(__pyx_t_3);
17218   __Pyx_INCREF(__pyx_n_u_bool);
17219   __Pyx_GIVEREF(__pyx_n_u_bool);
17220   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_bool);
17221   __Pyx_GIVEREF(__pyx_t_1);
17222   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
17223   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_BoolElement));
17224   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_BoolElement));
17225   PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_BoolElement));
17226   __Pyx_GIVEREF(__pyx_t_2);
17227   PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
17228   __pyx_t_1 = 0;
17229   __pyx_t_2 = 0;
17230   __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)
17231   __Pyx_GOTREF(__pyx_t_2);
17232   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17233   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2));
17234   __pyx_t_2 = 0;
17235
17236   /* "lxml/objectify.pyx":1048
17237  * 
17238  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
17239  *     pytype.xmlSchemaTypes = (u"boolean",)             # <<<<<<<<<<<<<<
17240  *     pytype.register()
17241  * 
17242  */
17243   if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__7) < 0) __PYX_ERR(0, 1048, __pyx_L1_error)
17244
17245   /* "lxml/objectify.pyx":1049
17246  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
17247  *     pytype.xmlSchemaTypes = (u"boolean",)
17248  *     pytype.register()             # <<<<<<<<<<<<<<
17249  * 
17250  *     pytype = PyType(u'str', None, StringElement)
17251  */
17252   __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)
17253   __Pyx_GOTREF(__pyx_t_3);
17254   __pyx_t_1 = NULL;
17255   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
17256     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
17257     if (likely(__pyx_t_1)) {
17258       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
17259       __Pyx_INCREF(__pyx_t_1);
17260       __Pyx_INCREF(function);
17261       __Pyx_DECREF_SET(__pyx_t_3, function);
17262     }
17263   }
17264   __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
17265   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17266   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
17267   __Pyx_GOTREF(__pyx_t_2);
17268   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17269   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17270
17271   /* "lxml/objectify.pyx":1051
17272  *     pytype.register()
17273  * 
17274  *     pytype = PyType(u'str', None, StringElement)             # <<<<<<<<<<<<<<
17275  *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",
17276  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
17277  */
17278   __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error)
17279   __Pyx_GOTREF(__pyx_t_2);
17280   __Pyx_INCREF(__pyx_n_u_str);
17281   __Pyx_GIVEREF(__pyx_n_u_str);
17282   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_str);
17283   __Pyx_INCREF(Py_None);
17284   __Pyx_GIVEREF(Py_None);
17285   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
17286   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
17287   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
17288   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
17289   __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)
17290   __Pyx_GOTREF(__pyx_t_3);
17291   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17292   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3));
17293   __pyx_t_3 = 0;
17294
17295   /* "lxml/objectify.pyx":1052
17296  * 
17297  *     pytype = PyType(u'str', None, StringElement)
17298  *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",             # <<<<<<<<<<<<<<
17299  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
17300  *                              u"NMTOKEN", )
17301  */
17302   if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__8) < 0) __PYX_ERR(0, 1052, __pyx_L1_error)
17303
17304   /* "lxml/objectify.pyx":1055
17305  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
17306  *                              u"NMTOKEN", )
17307  *     pytype.register()             # <<<<<<<<<<<<<<
17308  * 
17309  *     # since lxml 2.0
17310  */
17311   __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)
17312   __Pyx_GOTREF(__pyx_t_2);
17313   __pyx_t_1 = NULL;
17314   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
17315     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
17316     if (likely(__pyx_t_1)) {
17317       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17318       __Pyx_INCREF(__pyx_t_1);
17319       __Pyx_INCREF(function);
17320       __Pyx_DECREF_SET(__pyx_t_2, function);
17321     }
17322   }
17323   __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
17324   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17325   if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
17326   __Pyx_GOTREF(__pyx_t_3);
17327   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17328   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17329
17330   /* "lxml/objectify.pyx":1058
17331  * 
17332  *     # since lxml 2.0
17333  *     pytype = PyType(u'NoneType', None, NoneElement)             # <<<<<<<<<<<<<<
17334  *     pytype.register()
17335  * 
17336  */
17337   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error)
17338   __Pyx_GOTREF(__pyx_t_3);
17339   __Pyx_INCREF(__pyx_n_u_NoneType);
17340   __Pyx_GIVEREF(__pyx_n_u_NoneType);
17341   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_NoneType);
17342   __Pyx_INCREF(Py_None);
17343   __Pyx_GIVEREF(Py_None);
17344   PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
17345   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17346   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17347   PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17348   __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)
17349   __Pyx_GOTREF(__pyx_t_2);
17350   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17351   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2));
17352   __pyx_t_2 = 0;
17353
17354   /* "lxml/objectify.pyx":1059
17355  *     # since lxml 2.0
17356  *     pytype = PyType(u'NoneType', None, NoneElement)
17357  *     pytype.register()             # <<<<<<<<<<<<<<
17358  * 
17359  *     # backwards compatibility
17360  */
17361   __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)
17362   __Pyx_GOTREF(__pyx_t_3);
17363   __pyx_t_1 = NULL;
17364   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
17365     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
17366     if (likely(__pyx_t_1)) {
17367       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
17368       __Pyx_INCREF(__pyx_t_1);
17369       __Pyx_INCREF(function);
17370       __Pyx_DECREF_SET(__pyx_t_3, function);
17371     }
17372   }
17373   __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
17374   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17375   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1059, __pyx_L1_error)
17376   __Pyx_GOTREF(__pyx_t_2);
17377   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17378   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17379
17380   /* "lxml/objectify.pyx":1062
17381  * 
17382  *     # backwards compatibility
17383  *     pytype = PyType(u'none', None, NoneElement)             # <<<<<<<<<<<<<<
17384  *     pytype.register()
17385  * 
17386  */
17387   __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error)
17388   __Pyx_GOTREF(__pyx_t_2);
17389   __Pyx_INCREF(__pyx_n_u_none);
17390   __Pyx_GIVEREF(__pyx_n_u_none);
17391   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_none);
17392   __Pyx_INCREF(Py_None);
17393   __Pyx_GIVEREF(Py_None);
17394   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
17395   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17396   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17397   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17398   __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)
17399   __Pyx_GOTREF(__pyx_t_3);
17400   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17401   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3));
17402   __pyx_t_3 = 0;
17403
17404   /* "lxml/objectify.pyx":1063
17405  *     # backwards compatibility
17406  *     pytype = PyType(u'none', None, NoneElement)
17407  *     pytype.register()             # <<<<<<<<<<<<<<
17408  * 
17409  * # non-registered PyType for inner tree elements
17410  */
17411   __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)
17412   __Pyx_GOTREF(__pyx_t_2);
17413   __pyx_t_1 = NULL;
17414   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
17415     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
17416     if (likely(__pyx_t_1)) {
17417       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17418       __Pyx_INCREF(__pyx_t_1);
17419       __Pyx_INCREF(function);
17420       __Pyx_DECREF_SET(__pyx_t_2, function);
17421     }
17422   }
17423   __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
17424   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17425   if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L1_error)
17426   __Pyx_GOTREF(__pyx_t_3);
17427   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17428   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17429
17430   /* "lxml/objectify.pyx":1031
17431  *     return _pytypename(obj)
17432  * 
17433  * cdef _registerPyTypes():             # <<<<<<<<<<<<<<
17434  *     pytype = PyType(u'int', int, IntElement)
17435  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
17436  */
17437
17438   /* function exit code */
17439   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17440   goto __pyx_L0;
17441   __pyx_L1_error:;
17442   __Pyx_XDECREF(__pyx_t_1);
17443   __Pyx_XDECREF(__pyx_t_2);
17444   __Pyx_XDECREF(__pyx_t_3);
17445   __Pyx_AddTraceback("lxml.objectify._registerPyTypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
17446   __pyx_r = 0;
17447   __pyx_L0:;
17448   __Pyx_XDECREF((PyObject *)__pyx_v_pytype);
17449   __Pyx_XGIVEREF(__pyx_r);
17450   __Pyx_RefNannyFinishContext();
17451   return __pyx_r;
17452 }
17453
17454 /* "lxml/objectify.pyx":1070
17455  * _registerPyTypes()
17456  * 
17457  * def getRegisteredTypes():             # <<<<<<<<<<<<<<
17458  *     u"""getRegisteredTypes()
17459  * 
17460  */
17461
17462 /* Python wrapper */
17463 static PyObject *__pyx_pw_4lxml_9objectify_11getRegisteredTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
17464 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    ";
17465 static PyMethodDef __pyx_mdef_4lxml_9objectify_11getRegisteredTypes = {"getRegisteredTypes", (PyCFunction)__pyx_pw_4lxml_9objectify_11getRegisteredTypes, METH_NOARGS, __pyx_doc_4lxml_9objectify_10getRegisteredTypes};
17466 static PyObject *__pyx_pw_4lxml_9objectify_11getRegisteredTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
17467   PyObject *__pyx_r = 0;
17468   __Pyx_RefNannyDeclarations
17469   __Pyx_RefNannySetupContext("getRegisteredTypes (wrapper)", 0);
17470   __pyx_r = __pyx_pf_4lxml_9objectify_10getRegisteredTypes(__pyx_self);
17471
17472   /* function exit code */
17473   __Pyx_RefNannyFinishContext();
17474   return __pyx_r;
17475 }
17476
17477 static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED PyObject *__pyx_self) {
17478   PyObject *__pyx_v_types = 0;
17479   PyObject *__pyx_v_known = 0;
17480   CYTHON_UNUSED PyObject *__pyx_v_check = NULL;
17481   PyObject *__pyx_v_pytype = NULL;
17482   PyObject *__pyx_v_name = NULL;
17483   PyObject *__pyx_r = NULL;
17484   __Pyx_RefNannyDeclarations
17485   PyObject *__pyx_t_1 = NULL;
17486   Py_ssize_t __pyx_t_2;
17487   PyObject *__pyx_t_3 = NULL;
17488   PyObject *__pyx_t_4 = NULL;
17489   PyObject *__pyx_t_5 = NULL;
17490   PyObject *__pyx_t_6 = NULL;
17491   PyObject *(*__pyx_t_7)(PyObject *);
17492   int __pyx_t_8;
17493   int __pyx_t_9;
17494   int __pyx_t_10;
17495   PyObject *(*__pyx_t_11)(PyObject *);
17496   int __pyx_lineno = 0;
17497   const char *__pyx_filename = NULL;
17498   int __pyx_clineno = 0;
17499   __Pyx_RefNannySetupContext("getRegisteredTypes", 0);
17500
17501   /* "lxml/objectify.pyx":1085
17502  *     end of the type list.
17503  *     """
17504  *     cdef list types = []             # <<<<<<<<<<<<<<
17505  *     cdef set known = set()
17506  *     for check, pytype in _TYPE_CHECKS:
17507  */
17508   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
17509   __Pyx_GOTREF(__pyx_t_1);
17510   __pyx_v_types = ((PyObject*)__pyx_t_1);
17511   __pyx_t_1 = 0;
17512
17513   /* "lxml/objectify.pyx":1086
17514  *     """
17515  *     cdef list types = []
17516  *     cdef set known = set()             # <<<<<<<<<<<<<<
17517  *     for check, pytype in _TYPE_CHECKS:
17518  *         name = pytype.name
17519  */
17520   __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
17521   __Pyx_GOTREF(__pyx_t_1);
17522   __pyx_v_known = ((PyObject*)__pyx_t_1);
17523   __pyx_t_1 = 0;
17524
17525   /* "lxml/objectify.pyx":1087
17526  *     cdef list types = []
17527  *     cdef set known = set()
17528  *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
17529  *         name = pytype.name
17530  *         if name not in known:
17531  */
17532   if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
17533     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
17534     __PYX_ERR(0, 1087, __pyx_L1_error)
17535   }
17536   __pyx_t_1 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
17537   for (;;) {
17538     if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
17539     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17540     __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)
17541     #else
17542     __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)
17543     __Pyx_GOTREF(__pyx_t_3);
17544     #endif
17545     if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
17546       PyObject* sequence = __pyx_t_3;
17547       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17548       if (unlikely(size != 2)) {
17549         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
17550         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17551         __PYX_ERR(0, 1087, __pyx_L1_error)
17552       }
17553       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17554       if (likely(PyTuple_CheckExact(sequence))) {
17555         __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
17556         __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
17557       } else {
17558         __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
17559         __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
17560       }
17561       __Pyx_INCREF(__pyx_t_4);
17562       __Pyx_INCREF(__pyx_t_5);
17563       #else
17564       __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
17565       __Pyx_GOTREF(__pyx_t_4);
17566       __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1087, __pyx_L1_error)
17567       __Pyx_GOTREF(__pyx_t_5);
17568       #endif
17569       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17570     } else {
17571       Py_ssize_t index = -1;
17572       __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1087, __pyx_L1_error)
17573       __Pyx_GOTREF(__pyx_t_6);
17574       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17575       __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
17576       index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
17577       __Pyx_GOTREF(__pyx_t_4);
17578       index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
17579       __Pyx_GOTREF(__pyx_t_5);
17580       if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1087, __pyx_L1_error)
17581       __pyx_t_7 = NULL;
17582       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17583       goto __pyx_L6_unpacking_done;
17584       __pyx_L5_unpacking_failed:;
17585       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17586       __pyx_t_7 = NULL;
17587       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17588       __PYX_ERR(0, 1087, __pyx_L1_error)
17589       __pyx_L6_unpacking_done:;
17590     }
17591     __Pyx_XDECREF_SET(__pyx_v_check, __pyx_t_4);
17592     __pyx_t_4 = 0;
17593     __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_5);
17594     __pyx_t_5 = 0;
17595
17596     /* "lxml/objectify.pyx":1088
17597  *     cdef set known = set()
17598  *     for check, pytype in _TYPE_CHECKS:
17599  *         name = pytype.name             # <<<<<<<<<<<<<<
17600  *         if name not in known:
17601  *             known.add(name)
17602  */
17603     __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)
17604     __Pyx_GOTREF(__pyx_t_3);
17605     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
17606     __pyx_t_3 = 0;
17607
17608     /* "lxml/objectify.pyx":1089
17609  *     for check, pytype in _TYPE_CHECKS:
17610  *         name = pytype.name
17611  *         if name not in known:             # <<<<<<<<<<<<<<
17612  *             known.add(name)
17613  *             types.append(pytype)
17614  */
17615     __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)
17616     __pyx_t_9 = (__pyx_t_8 != 0);
17617     if (__pyx_t_9) {
17618
17619       /* "lxml/objectify.pyx":1090
17620  *         name = pytype.name
17621  *         if name not in known:
17622  *             known.add(name)             # <<<<<<<<<<<<<<
17623  *             types.append(pytype)
17624  *     for pytype in _PYTYPE_DICT.values():
17625  */
17626       __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)
17627
17628       /* "lxml/objectify.pyx":1091
17629  *         if name not in known:
17630  *             known.add(name)
17631  *             types.append(pytype)             # <<<<<<<<<<<<<<
17632  *     for pytype in _PYTYPE_DICT.values():
17633  *         name = pytype.name
17634  */
17635       __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)
17636
17637       /* "lxml/objectify.pyx":1089
17638  *     for check, pytype in _TYPE_CHECKS:
17639  *         name = pytype.name
17640  *         if name not in known:             # <<<<<<<<<<<<<<
17641  *             known.add(name)
17642  *             types.append(pytype)
17643  */
17644     }
17645
17646     /* "lxml/objectify.pyx":1087
17647  *     cdef list types = []
17648  *     cdef set known = set()
17649  *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
17650  *         name = pytype.name
17651  *         if name not in known:
17652  */
17653   }
17654   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17655
17656   /* "lxml/objectify.pyx":1092
17657  *             known.add(name)
17658  *             types.append(pytype)
17659  *     for pytype in _PYTYPE_DICT.values():             # <<<<<<<<<<<<<<
17660  *         name = pytype.name
17661  *         if name not in known:
17662  */
17663   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
17664     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
17665     __PYX_ERR(0, 1092, __pyx_L1_error)
17666   }
17667   __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_4lxml_9objectify__PYTYPE_DICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
17668   __Pyx_GOTREF(__pyx_t_1);
17669   if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
17670     __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0;
17671     __pyx_t_11 = NULL;
17672   } else {
17673     __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
17674     __Pyx_GOTREF(__pyx_t_3);
17675     __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1092, __pyx_L1_error)
17676   }
17677   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17678   for (;;) {
17679     if (likely(!__pyx_t_11)) {
17680       if (likely(PyList_CheckExact(__pyx_t_3))) {
17681         if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
17682         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17683         __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)
17684         #else
17685         __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)
17686         __Pyx_GOTREF(__pyx_t_1);
17687         #endif
17688       } else {
17689         if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
17690         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17691         __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)
17692         #else
17693         __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)
17694         __Pyx_GOTREF(__pyx_t_1);
17695         #endif
17696       }
17697     } else {
17698       __pyx_t_1 = __pyx_t_11(__pyx_t_3);
17699       if (unlikely(!__pyx_t_1)) {
17700         PyObject* exc_type = PyErr_Occurred();
17701         if (exc_type) {
17702           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17703           else __PYX_ERR(0, 1092, __pyx_L1_error)
17704         }
17705         break;
17706       }
17707       __Pyx_GOTREF(__pyx_t_1);
17708     }
17709     __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_1);
17710     __pyx_t_1 = 0;
17711
17712     /* "lxml/objectify.pyx":1093
17713  *             types.append(pytype)
17714  *     for pytype in _PYTYPE_DICT.values():
17715  *         name = pytype.name             # <<<<<<<<<<<<<<
17716  *         if name not in known:
17717  *             known.add(name)
17718  */
17719     __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)
17720     __Pyx_GOTREF(__pyx_t_1);
17721     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
17722     __pyx_t_1 = 0;
17723
17724     /* "lxml/objectify.pyx":1094
17725  *     for pytype in _PYTYPE_DICT.values():
17726  *         name = pytype.name
17727  *         if name not in known:             # <<<<<<<<<<<<<<
17728  *             known.add(name)
17729  *             types.append(pytype)
17730  */
17731     __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)
17732     __pyx_t_8 = (__pyx_t_9 != 0);
17733     if (__pyx_t_8) {
17734
17735       /* "lxml/objectify.pyx":1095
17736  *         name = pytype.name
17737  *         if name not in known:
17738  *             known.add(name)             # <<<<<<<<<<<<<<
17739  *             types.append(pytype)
17740  *     return types
17741  */
17742       __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)
17743
17744       /* "lxml/objectify.pyx":1096
17745  *         if name not in known:
17746  *             known.add(name)
17747  *             types.append(pytype)             # <<<<<<<<<<<<<<
17748  *     return types
17749  * 
17750  */
17751       __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)
17752
17753       /* "lxml/objectify.pyx":1094
17754  *     for pytype in _PYTYPE_DICT.values():
17755  *         name = pytype.name
17756  *         if name not in known:             # <<<<<<<<<<<<<<
17757  *             known.add(name)
17758  *             types.append(pytype)
17759  */
17760     }
17761
17762     /* "lxml/objectify.pyx":1092
17763  *             known.add(name)
17764  *             types.append(pytype)
17765  *     for pytype in _PYTYPE_DICT.values():             # <<<<<<<<<<<<<<
17766  *         name = pytype.name
17767  *         if name not in known:
17768  */
17769   }
17770   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17771
17772   /* "lxml/objectify.pyx":1097
17773  *             known.add(name)
17774  *             types.append(pytype)
17775  *     return types             # <<<<<<<<<<<<<<
17776  * 
17777  * cdef PyType _guessPyType(value, PyType defaulttype):
17778  */
17779   __Pyx_XDECREF(__pyx_r);
17780   __Pyx_INCREF(__pyx_v_types);
17781   __pyx_r = __pyx_v_types;
17782   goto __pyx_L0;
17783
17784   /* "lxml/objectify.pyx":1070
17785  * _registerPyTypes()
17786  * 
17787  * def getRegisteredTypes():             # <<<<<<<<<<<<<<
17788  *     u"""getRegisteredTypes()
17789  * 
17790  */
17791
17792   /* function exit code */
17793   __pyx_L1_error:;
17794   __Pyx_XDECREF(__pyx_t_1);
17795   __Pyx_XDECREF(__pyx_t_3);
17796   __Pyx_XDECREF(__pyx_t_4);
17797   __Pyx_XDECREF(__pyx_t_5);
17798   __Pyx_XDECREF(__pyx_t_6);
17799   __Pyx_AddTraceback("lxml.objectify.getRegisteredTypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
17800   __pyx_r = NULL;
17801   __pyx_L0:;
17802   __Pyx_XDECREF(__pyx_v_types);
17803   __Pyx_XDECREF(__pyx_v_known);
17804   __Pyx_XDECREF(__pyx_v_check);
17805   __Pyx_XDECREF(__pyx_v_pytype);
17806   __Pyx_XDECREF(__pyx_v_name);
17807   __Pyx_XGIVEREF(__pyx_r);
17808   __Pyx_RefNannyFinishContext();
17809   return __pyx_r;
17810 }
17811
17812 /* "lxml/objectify.pyx":1099
17813  *     return types
17814  * 
17815  * cdef PyType _guessPyType(value, PyType defaulttype):             # <<<<<<<<<<<<<<
17816  *     if value is None:
17817  *         return None
17818  */
17819
17820 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) {
17821   PyObject *__pyx_v_type_check = NULL;
17822   PyObject *__pyx_v_tested_pytype = NULL;
17823   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
17824   __Pyx_RefNannyDeclarations
17825   int __pyx_t_1;
17826   int __pyx_t_2;
17827   PyObject *__pyx_t_3 = NULL;
17828   Py_ssize_t __pyx_t_4;
17829   PyObject *__pyx_t_5 = NULL;
17830   PyObject *__pyx_t_6 = NULL;
17831   PyObject *__pyx_t_7 = NULL;
17832   PyObject *__pyx_t_8 = NULL;
17833   PyObject *(*__pyx_t_9)(PyObject *);
17834   PyObject *__pyx_t_10 = NULL;
17835   PyObject *__pyx_t_11 = NULL;
17836   PyObject *__pyx_t_12 = NULL;
17837   int __pyx_t_13;
17838   int __pyx_lineno = 0;
17839   const char *__pyx_filename = NULL;
17840   int __pyx_clineno = 0;
17841   __Pyx_RefNannySetupContext("_guessPyType", 0);
17842
17843   /* "lxml/objectify.pyx":1100
17844  * 
17845  * cdef PyType _guessPyType(value, PyType defaulttype):
17846  *     if value is None:             # <<<<<<<<<<<<<<
17847  *         return None
17848  *     for type_check, tested_pytype in _TYPE_CHECKS:
17849  */
17850   __pyx_t_1 = (__pyx_v_value == Py_None);
17851   __pyx_t_2 = (__pyx_t_1 != 0);
17852   if (__pyx_t_2) {
17853
17854     /* "lxml/objectify.pyx":1101
17855  * cdef PyType _guessPyType(value, PyType defaulttype):
17856  *     if value is None:
17857  *         return None             # <<<<<<<<<<<<<<
17858  *     for type_check, tested_pytype in _TYPE_CHECKS:
17859  *         try:
17860  */
17861     __Pyx_XDECREF(((PyObject *)__pyx_r));
17862     __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
17863     goto __pyx_L0;
17864
17865     /* "lxml/objectify.pyx":1100
17866  * 
17867  * cdef PyType _guessPyType(value, PyType defaulttype):
17868  *     if value is None:             # <<<<<<<<<<<<<<
17869  *         return None
17870  *     for type_check, tested_pytype in _TYPE_CHECKS:
17871  */
17872   }
17873
17874   /* "lxml/objectify.pyx":1102
17875  *     if value is None:
17876  *         return None
17877  *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
17878  *         try:
17879  *             type_check(value)
17880  */
17881   if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
17882     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
17883     __PYX_ERR(0, 1102, __pyx_L1_error)
17884   }
17885   __pyx_t_3 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
17886   for (;;) {
17887     if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
17888     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17889     __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)
17890     #else
17891     __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)
17892     __Pyx_GOTREF(__pyx_t_5);
17893     #endif
17894     if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
17895       PyObject* sequence = __pyx_t_5;
17896       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17897       if (unlikely(size != 2)) {
17898         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
17899         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17900         __PYX_ERR(0, 1102, __pyx_L1_error)
17901       }
17902       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17903       if (likely(PyTuple_CheckExact(sequence))) {
17904         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
17905         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
17906       } else {
17907         __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
17908         __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
17909       }
17910       __Pyx_INCREF(__pyx_t_6);
17911       __Pyx_INCREF(__pyx_t_7);
17912       #else
17913       __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1102, __pyx_L1_error)
17914       __Pyx_GOTREF(__pyx_t_6);
17915       __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1102, __pyx_L1_error)
17916       __Pyx_GOTREF(__pyx_t_7);
17917       #endif
17918       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17919     } else {
17920       Py_ssize_t index = -1;
17921       __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1102, __pyx_L1_error)
17922       __Pyx_GOTREF(__pyx_t_8);
17923       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17924       __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
17925       index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
17926       __Pyx_GOTREF(__pyx_t_6);
17927       index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
17928       __Pyx_GOTREF(__pyx_t_7);
17929       if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1102, __pyx_L1_error)
17930       __pyx_t_9 = NULL;
17931       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17932       goto __pyx_L7_unpacking_done;
17933       __pyx_L6_unpacking_failed:;
17934       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17935       __pyx_t_9 = NULL;
17936       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17937       __PYX_ERR(0, 1102, __pyx_L1_error)
17938       __pyx_L7_unpacking_done:;
17939     }
17940     __Pyx_XDECREF_SET(__pyx_v_type_check, __pyx_t_6);
17941     __pyx_t_6 = 0;
17942     __Pyx_XDECREF_SET(__pyx_v_tested_pytype, __pyx_t_7);
17943     __pyx_t_7 = 0;
17944
17945     /* "lxml/objectify.pyx":1103
17946  *         return None
17947  *     for type_check, tested_pytype in _TYPE_CHECKS:
17948  *         try:             # <<<<<<<<<<<<<<
17949  *             type_check(value)
17950  *             return <PyType>tested_pytype
17951  */
17952     {
17953       __Pyx_PyThreadState_declare
17954       __Pyx_PyThreadState_assign
17955       __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
17956       __Pyx_XGOTREF(__pyx_t_10);
17957       __Pyx_XGOTREF(__pyx_t_11);
17958       __Pyx_XGOTREF(__pyx_t_12);
17959       /*try:*/ {
17960
17961         /* "lxml/objectify.pyx":1104
17962  *     for type_check, tested_pytype in _TYPE_CHECKS:
17963  *         try:
17964  *             type_check(value)             # <<<<<<<<<<<<<<
17965  *             return <PyType>tested_pytype
17966  *         except IGNORABLE_ERRORS:
17967  */
17968         __Pyx_INCREF(__pyx_v_type_check);
17969         __pyx_t_7 = __pyx_v_type_check; __pyx_t_6 = NULL;
17970         if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
17971           __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
17972           if (likely(__pyx_t_6)) {
17973             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
17974             __Pyx_INCREF(__pyx_t_6);
17975             __Pyx_INCREF(function);
17976             __Pyx_DECREF_SET(__pyx_t_7, function);
17977           }
17978         }
17979         __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);
17980         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17981         if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1104, __pyx_L8_error)
17982         __Pyx_GOTREF(__pyx_t_5);
17983         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17984         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17985
17986         /* "lxml/objectify.pyx":1105
17987  *         try:
17988  *             type_check(value)
17989  *             return <PyType>tested_pytype             # <<<<<<<<<<<<<<
17990  *         except IGNORABLE_ERRORS:
17991  *             # could not be parsed as the specified type => ignore
17992  */
17993         __Pyx_XDECREF(((PyObject *)__pyx_r));
17994         __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype)));
17995         __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype);
17996         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17997         goto __pyx_L12_try_return;
17998
17999         /* "lxml/objectify.pyx":1103
18000  *         return None
18001  *     for type_check, tested_pytype in _TYPE_CHECKS:
18002  *         try:             # <<<<<<<<<<<<<<
18003  *             type_check(value)
18004  *             return <PyType>tested_pytype
18005  */
18006       }
18007       __pyx_L8_error:;
18008       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18009       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18010       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
18011       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
18012
18013       /* "lxml/objectify.pyx":1106
18014  *             type_check(value)
18015  *             return <PyType>tested_pytype
18016  *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
18017  *             # could not be parsed as the specified type => ignore
18018  *             pass
18019  */
18020       __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
18021       if (__pyx_t_13) {
18022         __Pyx_ErrRestore(0,0,0);
18023         goto __pyx_L9_exception_handled;
18024       }
18025       goto __pyx_L10_except_error;
18026       __pyx_L10_except_error:;
18027
18028       /* "lxml/objectify.pyx":1103
18029  *         return None
18030  *     for type_check, tested_pytype in _TYPE_CHECKS:
18031  *         try:             # <<<<<<<<<<<<<<
18032  *             type_check(value)
18033  *             return <PyType>tested_pytype
18034  */
18035       __Pyx_XGIVEREF(__pyx_t_10);
18036       __Pyx_XGIVEREF(__pyx_t_11);
18037       __Pyx_XGIVEREF(__pyx_t_12);
18038       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18039       goto __pyx_L1_error;
18040       __pyx_L12_try_return:;
18041       __Pyx_XGIVEREF(__pyx_t_10);
18042       __Pyx_XGIVEREF(__pyx_t_11);
18043       __Pyx_XGIVEREF(__pyx_t_12);
18044       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18045       goto __pyx_L0;
18046       __pyx_L9_exception_handled:;
18047       __Pyx_XGIVEREF(__pyx_t_10);
18048       __Pyx_XGIVEREF(__pyx_t_11);
18049       __Pyx_XGIVEREF(__pyx_t_12);
18050       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18051     }
18052
18053     /* "lxml/objectify.pyx":1102
18054  *     if value is None:
18055  *         return None
18056  *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
18057  *         try:
18058  *             type_check(value)
18059  */
18060   }
18061   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18062
18063   /* "lxml/objectify.pyx":1109
18064  *             # could not be parsed as the specified type => ignore
18065  *             pass
18066  *     return defaulttype             # <<<<<<<<<<<<<<
18067  * 
18068  * cdef object _guessElementClass(tree.xmlNode* c_node):
18069  */
18070   __Pyx_XDECREF(((PyObject *)__pyx_r));
18071   __Pyx_INCREF(((PyObject *)__pyx_v_defaulttype));
18072   __pyx_r = __pyx_v_defaulttype;
18073   goto __pyx_L0;
18074
18075   /* "lxml/objectify.pyx":1099
18076  *     return types
18077  * 
18078  * cdef PyType _guessPyType(value, PyType defaulttype):             # <<<<<<<<<<<<<<
18079  *     if value is None:
18080  *         return None
18081  */
18082
18083   /* function exit code */
18084   __pyx_L1_error:;
18085   __Pyx_XDECREF(__pyx_t_3);
18086   __Pyx_XDECREF(__pyx_t_5);
18087   __Pyx_XDECREF(__pyx_t_6);
18088   __Pyx_XDECREF(__pyx_t_7);
18089   __Pyx_XDECREF(__pyx_t_8);
18090   __Pyx_AddTraceback("lxml.objectify._guessPyType", __pyx_clineno, __pyx_lineno, __pyx_filename);
18091   __pyx_r = 0;
18092   __pyx_L0:;
18093   __Pyx_XDECREF(__pyx_v_type_check);
18094   __Pyx_XDECREF(__pyx_v_tested_pytype);
18095   __Pyx_XGIVEREF((PyObject *)__pyx_r);
18096   __Pyx_RefNannyFinishContext();
18097   return __pyx_r;
18098 }
18099
18100 /* "lxml/objectify.pyx":1111
18101  *     return defaulttype
18102  * 
18103  * cdef object _guessElementClass(tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
18104  *     value = textOf(c_node)
18105  *     if value is None:
18106  */
18107
18108 static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_node) {
18109   PyObject *__pyx_v_value = NULL;
18110   PyObject *__pyx_v_type_check = NULL;
18111   PyObject *__pyx_v_pytype = NULL;
18112   PyObject *__pyx_r = NULL;
18113   __Pyx_RefNannyDeclarations
18114   PyObject *__pyx_t_1 = NULL;
18115   int __pyx_t_2;
18116   int __pyx_t_3;
18117   Py_ssize_t __pyx_t_4;
18118   PyObject *__pyx_t_5 = NULL;
18119   PyObject *__pyx_t_6 = NULL;
18120   PyObject *__pyx_t_7 = NULL;
18121   PyObject *__pyx_t_8 = NULL;
18122   PyObject *(*__pyx_t_9)(PyObject *);
18123   PyObject *__pyx_t_10 = NULL;
18124   PyObject *__pyx_t_11 = NULL;
18125   PyObject *__pyx_t_12 = NULL;
18126   int __pyx_t_13;
18127   int __pyx_lineno = 0;
18128   const char *__pyx_filename = NULL;
18129   int __pyx_clineno = 0;
18130   __Pyx_RefNannySetupContext("_guessElementClass", 0);
18131
18132   /* "lxml/objectify.pyx":1112
18133  * 
18134  * cdef object _guessElementClass(tree.xmlNode* c_node):
18135  *     value = textOf(c_node)             # <<<<<<<<<<<<<<
18136  *     if value is None:
18137  *         return None
18138  */
18139   __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error)
18140   __Pyx_GOTREF(__pyx_t_1);
18141   __pyx_v_value = __pyx_t_1;
18142   __pyx_t_1 = 0;
18143
18144   /* "lxml/objectify.pyx":1113
18145  * cdef object _guessElementClass(tree.xmlNode* c_node):
18146  *     value = textOf(c_node)
18147  *     if value is None:             # <<<<<<<<<<<<<<
18148  *         return None
18149  *     if value == '':
18150  */
18151   __pyx_t_2 = (__pyx_v_value == Py_None);
18152   __pyx_t_3 = (__pyx_t_2 != 0);
18153   if (__pyx_t_3) {
18154
18155     /* "lxml/objectify.pyx":1114
18156  *     value = textOf(c_node)
18157  *     if value is None:
18158  *         return None             # <<<<<<<<<<<<<<
18159  *     if value == '':
18160  *         return StringElement
18161  */
18162     __Pyx_XDECREF(__pyx_r);
18163     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18164     goto __pyx_L0;
18165
18166     /* "lxml/objectify.pyx":1113
18167  * cdef object _guessElementClass(tree.xmlNode* c_node):
18168  *     value = textOf(c_node)
18169  *     if value is None:             # <<<<<<<<<<<<<<
18170  *         return None
18171  *     if value == '':
18172  */
18173   }
18174
18175   /* "lxml/objectify.pyx":1115
18176  *     if value is None:
18177  *         return None
18178  *     if value == '':             # <<<<<<<<<<<<<<
18179  *         return StringElement
18180  * 
18181  */
18182   __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)
18183   if (__pyx_t_3) {
18184
18185     /* "lxml/objectify.pyx":1116
18186  *         return None
18187  *     if value == '':
18188  *         return StringElement             # <<<<<<<<<<<<<<
18189  * 
18190  *     for type_check, pytype in _TYPE_CHECKS:
18191  */
18192     __Pyx_XDECREF(__pyx_r);
18193     __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
18194     __pyx_r = ((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement);
18195     goto __pyx_L0;
18196
18197     /* "lxml/objectify.pyx":1115
18198  *     if value is None:
18199  *         return None
18200  *     if value == '':             # <<<<<<<<<<<<<<
18201  *         return StringElement
18202  * 
18203  */
18204   }
18205
18206   /* "lxml/objectify.pyx":1118
18207  *         return StringElement
18208  * 
18209  *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
18210  *         try:
18211  *             type_check(value)
18212  */
18213   if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
18214     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
18215     __PYX_ERR(0, 1118, __pyx_L1_error)
18216   }
18217   __pyx_t_1 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
18218   for (;;) {
18219     if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
18220     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18221     __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)
18222     #else
18223     __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)
18224     __Pyx_GOTREF(__pyx_t_5);
18225     #endif
18226     if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
18227       PyObject* sequence = __pyx_t_5;
18228       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
18229       if (unlikely(size != 2)) {
18230         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
18231         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
18232         __PYX_ERR(0, 1118, __pyx_L1_error)
18233       }
18234       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18235       if (likely(PyTuple_CheckExact(sequence))) {
18236         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
18237         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
18238       } else {
18239         __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
18240         __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
18241       }
18242       __Pyx_INCREF(__pyx_t_6);
18243       __Pyx_INCREF(__pyx_t_7);
18244       #else
18245       __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1118, __pyx_L1_error)
18246       __Pyx_GOTREF(__pyx_t_6);
18247       __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1118, __pyx_L1_error)
18248       __Pyx_GOTREF(__pyx_t_7);
18249       #endif
18250       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18251     } else {
18252       Py_ssize_t index = -1;
18253       __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1118, __pyx_L1_error)
18254       __Pyx_GOTREF(__pyx_t_8);
18255       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18256       __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
18257       index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed;
18258       __Pyx_GOTREF(__pyx_t_6);
18259       index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed;
18260       __Pyx_GOTREF(__pyx_t_7);
18261       if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1118, __pyx_L1_error)
18262       __pyx_t_9 = NULL;
18263       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18264       goto __pyx_L8_unpacking_done;
18265       __pyx_L7_unpacking_failed:;
18266       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18267       __pyx_t_9 = NULL;
18268       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
18269       __PYX_ERR(0, 1118, __pyx_L1_error)
18270       __pyx_L8_unpacking_done:;
18271     }
18272     __Pyx_XDECREF_SET(__pyx_v_type_check, __pyx_t_6);
18273     __pyx_t_6 = 0;
18274     __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_7);
18275     __pyx_t_7 = 0;
18276
18277     /* "lxml/objectify.pyx":1119
18278  * 
18279  *     for type_check, pytype in _TYPE_CHECKS:
18280  *         try:             # <<<<<<<<<<<<<<
18281  *             type_check(value)
18282  *             return (<PyType>pytype)._type
18283  */
18284     {
18285       __Pyx_PyThreadState_declare
18286       __Pyx_PyThreadState_assign
18287       __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
18288       __Pyx_XGOTREF(__pyx_t_10);
18289       __Pyx_XGOTREF(__pyx_t_11);
18290       __Pyx_XGOTREF(__pyx_t_12);
18291       /*try:*/ {
18292
18293         /* "lxml/objectify.pyx":1120
18294  *     for type_check, pytype in _TYPE_CHECKS:
18295  *         try:
18296  *             type_check(value)             # <<<<<<<<<<<<<<
18297  *             return (<PyType>pytype)._type
18298  *         except IGNORABLE_ERRORS:
18299  */
18300         __Pyx_INCREF(__pyx_v_type_check);
18301         __pyx_t_7 = __pyx_v_type_check; __pyx_t_6 = NULL;
18302         if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
18303           __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
18304           if (likely(__pyx_t_6)) {
18305             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
18306             __Pyx_INCREF(__pyx_t_6);
18307             __Pyx_INCREF(function);
18308             __Pyx_DECREF_SET(__pyx_t_7, function);
18309           }
18310         }
18311         __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);
18312         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18313         if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1120, __pyx_L9_error)
18314         __Pyx_GOTREF(__pyx_t_5);
18315         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18316         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18317
18318         /* "lxml/objectify.pyx":1121
18319  *         try:
18320  *             type_check(value)
18321  *             return (<PyType>pytype)._type             # <<<<<<<<<<<<<<
18322  *         except IGNORABLE_ERRORS:
18323  *             pass
18324  */
18325         __Pyx_XDECREF(__pyx_r);
18326         __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type);
18327         __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type;
18328         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18329         goto __pyx_L13_try_return;
18330
18331         /* "lxml/objectify.pyx":1119
18332  * 
18333  *     for type_check, pytype in _TYPE_CHECKS:
18334  *         try:             # <<<<<<<<<<<<<<
18335  *             type_check(value)
18336  *             return (<PyType>pytype)._type
18337  */
18338       }
18339       __pyx_L9_error:;
18340       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18341       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18342       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
18343       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
18344
18345       /* "lxml/objectify.pyx":1122
18346  *             type_check(value)
18347  *             return (<PyType>pytype)._type
18348  *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
18349  *             pass
18350  *     return None
18351  */
18352       __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
18353       if (__pyx_t_13) {
18354         __Pyx_ErrRestore(0,0,0);
18355         goto __pyx_L10_exception_handled;
18356       }
18357       goto __pyx_L11_except_error;
18358       __pyx_L11_except_error:;
18359
18360       /* "lxml/objectify.pyx":1119
18361  * 
18362  *     for type_check, pytype in _TYPE_CHECKS:
18363  *         try:             # <<<<<<<<<<<<<<
18364  *             type_check(value)
18365  *             return (<PyType>pytype)._type
18366  */
18367       __Pyx_XGIVEREF(__pyx_t_10);
18368       __Pyx_XGIVEREF(__pyx_t_11);
18369       __Pyx_XGIVEREF(__pyx_t_12);
18370       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18371       goto __pyx_L1_error;
18372       __pyx_L13_try_return:;
18373       __Pyx_XGIVEREF(__pyx_t_10);
18374       __Pyx_XGIVEREF(__pyx_t_11);
18375       __Pyx_XGIVEREF(__pyx_t_12);
18376       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18377       goto __pyx_L0;
18378       __pyx_L10_exception_handled:;
18379       __Pyx_XGIVEREF(__pyx_t_10);
18380       __Pyx_XGIVEREF(__pyx_t_11);
18381       __Pyx_XGIVEREF(__pyx_t_12);
18382       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18383     }
18384
18385     /* "lxml/objectify.pyx":1118
18386  *         return StringElement
18387  * 
18388  *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
18389  *         try:
18390  *             type_check(value)
18391  */
18392   }
18393   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18394
18395   /* "lxml/objectify.pyx":1124
18396  *         except IGNORABLE_ERRORS:
18397  *             pass
18398  *     return None             # <<<<<<<<<<<<<<
18399  * 
18400  * ################################################################################
18401  */
18402   __Pyx_XDECREF(__pyx_r);
18403   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18404   goto __pyx_L0;
18405
18406   /* "lxml/objectify.pyx":1111
18407  *     return defaulttype
18408  * 
18409  * cdef object _guessElementClass(tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
18410  *     value = textOf(c_node)
18411  *     if value is None:
18412  */
18413
18414   /* function exit code */
18415   __pyx_L1_error:;
18416   __Pyx_XDECREF(__pyx_t_1);
18417   __Pyx_XDECREF(__pyx_t_5);
18418   __Pyx_XDECREF(__pyx_t_6);
18419   __Pyx_XDECREF(__pyx_t_7);
18420   __Pyx_XDECREF(__pyx_t_8);
18421   __Pyx_AddTraceback("lxml.objectify._guessElementClass", __pyx_clineno, __pyx_lineno, __pyx_filename);
18422   __pyx_r = 0;
18423   __pyx_L0:;
18424   __Pyx_XDECREF(__pyx_v_value);
18425   __Pyx_XDECREF(__pyx_v_type_check);
18426   __Pyx_XDECREF(__pyx_v_pytype);
18427   __Pyx_XGIVEREF(__pyx_r);
18428   __Pyx_RefNannyFinishContext();
18429   return __pyx_r;
18430 }
18431
18432 /* "lxml/objectify.pyx":1137
18433  *     cdef bint _annotate
18434  * 
18435  *     def __call__(self, *children, **attrib):             # <<<<<<<<<<<<<<
18436  *         u"__call__(self, *children, **attrib)"
18437  *         cdef _ObjectifyElementMakerCaller elementMaker
18438  */
18439
18440 /* Python wrapper */
18441 static PyObject *__pyx_pw_4lxml_9objectify_28_ObjectifyElementMakerCaller_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18442 static char __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__[] = "__call__(self, *children, **attrib)";
18443 #if CYTHON_COMPILING_IN_CPYTHON
18444 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__;
18445 #endif
18446 static PyObject *__pyx_pw_4lxml_9objectify_28_ObjectifyElementMakerCaller_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18447   PyObject *__pyx_v_children = 0;
18448   PyObject *__pyx_v_attrib = 0;
18449   PyObject *__pyx_r = 0;
18450   __Pyx_RefNannyDeclarations
18451   __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
18452   if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
18453   __pyx_v_attrib = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_attrib)) return NULL;
18454   __Pyx_GOTREF(__pyx_v_attrib);
18455   __Pyx_INCREF(__pyx_args);
18456   __pyx_v_children = __pyx_args;
18457   __pyx_r = __pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self), __pyx_v_children, __pyx_v_attrib);
18458
18459   /* function exit code */
18460   __Pyx_XDECREF(__pyx_v_children);
18461   __Pyx_XDECREF(__pyx_v_attrib);
18462   __Pyx_RefNannyFinishContext();
18463   return __pyx_r;
18464 }
18465
18466 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) {
18467   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_elementMaker = 0;
18468   struct LxmlElement *__pyx_v_element = 0;
18469   struct LxmlElement *__pyx_v_childElement = 0;
18470   int __pyx_v_has_children;
18471   int __pyx_v_has_string_value;
18472   PyObject *__pyx_v_pytype_name = NULL;
18473   PyObject *__pyx_v_child = NULL;
18474   PyObject *__pyx_v_name = NULL;
18475   PyObject *__pyx_v_value = NULL;
18476   PyObject *__pyx_v_pytype = NULL;
18477   PyObject *__pyx_r = NULL;
18478   __Pyx_RefNannyDeclarations
18479   int __pyx_t_1;
18480   int __pyx_t_2;
18481   PyObject *__pyx_t_3 = NULL;
18482   PyObject *__pyx_t_4 = NULL;
18483   PyObject *__pyx_t_5 = NULL;
18484   int __pyx_t_6;
18485   PyObject *__pyx_t_7 = NULL;
18486   Py_ssize_t __pyx_t_8;
18487   Py_ssize_t __pyx_t_9;
18488   PyObject *(*__pyx_t_10)(PyObject *);
18489   PyObject *__pyx_t_11 = NULL;
18490   PyObject *__pyx_t_12 = NULL;
18491   PyObject *(*__pyx_t_13)(PyObject *);
18492   int __pyx_lineno = 0;
18493   const char *__pyx_filename = NULL;
18494   int __pyx_clineno = 0;
18495   __Pyx_RefNannySetupContext("__call__", 0);
18496
18497   /* "lxml/objectify.pyx":1144
18498  *         cdef bint has_children
18499  *         cdef bint has_string_value
18500  *         if self._element_factory is None:             # <<<<<<<<<<<<<<
18501  *             element = _makeElement(self._tag, None, attrib, self._nsmap)
18502  *         else:
18503  */
18504   __pyx_t_1 = (__pyx_v_self->_element_factory == Py_None);
18505   __pyx_t_2 = (__pyx_t_1 != 0);
18506   if (__pyx_t_2) {
18507
18508     /* "lxml/objectify.pyx":1145
18509  *         cdef bint has_string_value
18510  *         if self._element_factory is None:
18511  *             element = _makeElement(self._tag, None, attrib, self._nsmap)             # <<<<<<<<<<<<<<
18512  *         else:
18513  *             element = self._element_factory(self._tag, attrib, self._nsmap)
18514  */
18515     __pyx_t_3 = __pyx_v_self->_tag;
18516     __Pyx_INCREF(__pyx_t_3);
18517     __pyx_t_4 = __pyx_v_self->_nsmap;
18518     __Pyx_INCREF(__pyx_t_4);
18519     __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)
18520     __Pyx_GOTREF(__pyx_t_5);
18521     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18522     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18523     __pyx_v_element = ((struct LxmlElement *)__pyx_t_5);
18524     __pyx_t_5 = 0;
18525
18526     /* "lxml/objectify.pyx":1144
18527  *         cdef bint has_children
18528  *         cdef bint has_string_value
18529  *         if self._element_factory is None:             # <<<<<<<<<<<<<<
18530  *             element = _makeElement(self._tag, None, attrib, self._nsmap)
18531  *         else:
18532  */
18533     goto __pyx_L3;
18534   }
18535
18536   /* "lxml/objectify.pyx":1147
18537  *             element = _makeElement(self._tag, None, attrib, self._nsmap)
18538  *         else:
18539  *             element = self._element_factory(self._tag, attrib, self._nsmap)             # <<<<<<<<<<<<<<
18540  * 
18541  *         pytype_name = None
18542  */
18543   /*else*/ {
18544     __Pyx_INCREF(__pyx_v_self->_element_factory);
18545     __pyx_t_4 = __pyx_v_self->_element_factory; __pyx_t_3 = NULL;
18546     __pyx_t_6 = 0;
18547     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
18548       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
18549       if (likely(__pyx_t_3)) {
18550         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18551         __Pyx_INCREF(__pyx_t_3);
18552         __Pyx_INCREF(function);
18553         __Pyx_DECREF_SET(__pyx_t_4, function);
18554         __pyx_t_6 = 1;
18555       }
18556     }
18557     #if CYTHON_FAST_PYCALL
18558     if (PyFunction_Check(__pyx_t_4)) {
18559       PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->_tag, __pyx_v_attrib, __pyx_v_self->_nsmap};
18560       __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)
18561       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18562       __Pyx_GOTREF(__pyx_t_5);
18563     } else
18564     #endif
18565     #if CYTHON_FAST_PYCCALL
18566     if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
18567       PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->_tag, __pyx_v_attrib, __pyx_v_self->_nsmap};
18568       __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)
18569       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18570       __Pyx_GOTREF(__pyx_t_5);
18571     } else
18572     #endif
18573     {
18574       __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1147, __pyx_L1_error)
18575       __Pyx_GOTREF(__pyx_t_7);
18576       if (__pyx_t_3) {
18577         __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
18578       }
18579       __Pyx_INCREF(__pyx_v_self->_tag);
18580       __Pyx_GIVEREF(__pyx_v_self->_tag);
18581       PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->_tag);
18582       __Pyx_INCREF(__pyx_v_attrib);
18583       __Pyx_GIVEREF(__pyx_v_attrib);
18584       PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_attrib);
18585       __Pyx_INCREF(__pyx_v_self->_nsmap);
18586       __Pyx_GIVEREF(__pyx_v_self->_nsmap);
18587       PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_self->_nsmap);
18588       __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)
18589       __Pyx_GOTREF(__pyx_t_5);
18590       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18591     }
18592     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18593     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)
18594     __pyx_v_element = ((struct LxmlElement *)__pyx_t_5);
18595     __pyx_t_5 = 0;
18596   }
18597   __pyx_L3:;
18598
18599   /* "lxml/objectify.pyx":1149
18600  *             element = self._element_factory(self._tag, attrib, self._nsmap)
18601  * 
18602  *         pytype_name = None             # <<<<<<<<<<<<<<
18603  *         has_children = False
18604  *         has_string_value = False
18605  */
18606   __Pyx_INCREF(Py_None);
18607   __pyx_v_pytype_name = Py_None;
18608
18609   /* "lxml/objectify.pyx":1150
18610  * 
18611  *         pytype_name = None
18612  *         has_children = False             # <<<<<<<<<<<<<<
18613  *         has_string_value = False
18614  *         for child in children:
18615  */
18616   __pyx_v_has_children = 0;
18617
18618   /* "lxml/objectify.pyx":1151
18619  *         pytype_name = None
18620  *         has_children = False
18621  *         has_string_value = False             # <<<<<<<<<<<<<<
18622  *         for child in children:
18623  *             if child is None:
18624  */
18625   __pyx_v_has_string_value = 0;
18626
18627   /* "lxml/objectify.pyx":1152
18628  *         has_children = False
18629  *         has_string_value = False
18630  *         for child in children:             # <<<<<<<<<<<<<<
18631  *             if child is None:
18632  *                 if len(children) == 1:
18633  */
18634   __pyx_t_5 = __pyx_v_children; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
18635   for (;;) {
18636     if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
18637     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18638     __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)
18639     #else
18640     __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)
18641     __Pyx_GOTREF(__pyx_t_4);
18642     #endif
18643     __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_4);
18644     __pyx_t_4 = 0;
18645
18646     /* "lxml/objectify.pyx":1153
18647  *         has_string_value = False
18648  *         for child in children:
18649  *             if child is None:             # <<<<<<<<<<<<<<
18650  *                 if len(children) == 1:
18651  *                     cetree.setAttributeValue(
18652  */
18653     __pyx_t_2 = (__pyx_v_child == Py_None);
18654     __pyx_t_1 = (__pyx_t_2 != 0);
18655     if (__pyx_t_1) {
18656
18657       /* "lxml/objectify.pyx":1154
18658  *         for child in children:
18659  *             if child is None:
18660  *                 if len(children) == 1:             # <<<<<<<<<<<<<<
18661  *                     cetree.setAttributeValue(
18662  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18663  */
18664       __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)
18665       __pyx_t_1 = ((__pyx_t_9 == 1) != 0);
18666       if (__pyx_t_1) {
18667
18668         /* "lxml/objectify.pyx":1156
18669  *                 if len(children) == 1:
18670  *                     cetree.setAttributeValue(
18671  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")             # <<<<<<<<<<<<<<
18672  *             elif python._isString(child):
18673  *                 _add_text(element, child)
18674  */
18675         __pyx_t_4 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
18676         __Pyx_INCREF(__pyx_t_4);
18677
18678         /* "lxml/objectify.pyx":1155
18679  *             if child is None:
18680  *                 if len(children) == 1:
18681  *                     cetree.setAttributeValue(             # <<<<<<<<<<<<<<
18682  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18683  *             elif python._isString(child):
18684  */
18685         __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)
18686         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18687
18688         /* "lxml/objectify.pyx":1154
18689  *         for child in children:
18690  *             if child is None:
18691  *                 if len(children) == 1:             # <<<<<<<<<<<<<<
18692  *                     cetree.setAttributeValue(
18693  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18694  */
18695       }
18696
18697       /* "lxml/objectify.pyx":1153
18698  *         has_string_value = False
18699  *         for child in children:
18700  *             if child is None:             # <<<<<<<<<<<<<<
18701  *                 if len(children) == 1:
18702  *                     cetree.setAttributeValue(
18703  */
18704       goto __pyx_L6;
18705     }
18706
18707     /* "lxml/objectify.pyx":1157
18708  *                     cetree.setAttributeValue(
18709  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18710  *             elif python._isString(child):             # <<<<<<<<<<<<<<
18711  *                 _add_text(element, child)
18712  *                 has_string_value = True
18713  */
18714     __pyx_t_1 = (_isString(__pyx_v_child) != 0);
18715     if (__pyx_t_1) {
18716
18717       /* "lxml/objectify.pyx":1158
18718  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18719  *             elif python._isString(child):
18720  *                 _add_text(element, child)             # <<<<<<<<<<<<<<
18721  *                 has_string_value = True
18722  *             elif isinstance(child, _Element):
18723  */
18724       __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)
18725       __Pyx_GOTREF(__pyx_t_4);
18726       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18727
18728       /* "lxml/objectify.pyx":1159
18729  *             elif python._isString(child):
18730  *                 _add_text(element, child)
18731  *                 has_string_value = True             # <<<<<<<<<<<<<<
18732  *             elif isinstance(child, _Element):
18733  *                 cetree.appendChildToElement(element, <_Element>child)
18734  */
18735       __pyx_v_has_string_value = 1;
18736
18737       /* "lxml/objectify.pyx":1157
18738  *                     cetree.setAttributeValue(
18739  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18740  *             elif python._isString(child):             # <<<<<<<<<<<<<<
18741  *                 _add_text(element, child)
18742  *                 has_string_value = True
18743  */
18744       goto __pyx_L6;
18745     }
18746
18747     /* "lxml/objectify.pyx":1160
18748  *                 _add_text(element, child)
18749  *                 has_string_value = True
18750  *             elif isinstance(child, _Element):             # <<<<<<<<<<<<<<
18751  *                 cetree.appendChildToElement(element, <_Element>child)
18752  *                 has_children = True
18753  */
18754     __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_child, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
18755     __pyx_t_2 = (__pyx_t_1 != 0);
18756     if (__pyx_t_2) {
18757
18758       /* "lxml/objectify.pyx":1161
18759  *                 has_string_value = True
18760  *             elif isinstance(child, _Element):
18761  *                 cetree.appendChildToElement(element, <_Element>child)             # <<<<<<<<<<<<<<
18762  *                 has_children = True
18763  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18764  */
18765       __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)
18766
18767       /* "lxml/objectify.pyx":1162
18768  *             elif isinstance(child, _Element):
18769  *                 cetree.appendChildToElement(element, <_Element>child)
18770  *                 has_children = True             # <<<<<<<<<<<<<<
18771  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18772  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18773  */
18774       __pyx_v_has_children = 1;
18775
18776       /* "lxml/objectify.pyx":1160
18777  *                 _add_text(element, child)
18778  *                 has_string_value = True
18779  *             elif isinstance(child, _Element):             # <<<<<<<<<<<<<<
18780  *                 cetree.appendChildToElement(element, <_Element>child)
18781  *                 has_children = True
18782  */
18783       goto __pyx_L6;
18784     }
18785
18786     /* "lxml/objectify.pyx":1163
18787  *                 cetree.appendChildToElement(element, <_Element>child)
18788  *                 has_children = True
18789  *             elif isinstance(child, _ObjectifyElementMakerCaller):             # <<<<<<<<<<<<<<
18790  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18791  *                 if elementMaker._element_factory is None:
18792  */
18793     __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_child, __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller); 
18794     __pyx_t_1 = (__pyx_t_2 != 0);
18795     if (__pyx_t_1) {
18796
18797       /* "lxml/objectify.pyx":1164
18798  *                 has_children = True
18799  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18800  *                 elementMaker = <_ObjectifyElementMakerCaller>child             # <<<<<<<<<<<<<<
18801  *                 if elementMaker._element_factory is None:
18802  *                     cetree.makeSubElement(element, elementMaker._tag,
18803  */
18804       __pyx_t_4 = __pyx_v_child;
18805       __Pyx_INCREF(__pyx_t_4);
18806       __Pyx_XDECREF_SET(__pyx_v_elementMaker, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_4));
18807       __pyx_t_4 = 0;
18808
18809       /* "lxml/objectify.pyx":1165
18810  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18811  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18812  *                 if elementMaker._element_factory is None:             # <<<<<<<<<<<<<<
18813  *                     cetree.makeSubElement(element, elementMaker._tag,
18814  *                                           None, None, None, None)
18815  */
18816       __pyx_t_1 = (__pyx_v_elementMaker->_element_factory == Py_None);
18817       __pyx_t_2 = (__pyx_t_1 != 0);
18818       if (__pyx_t_2) {
18819
18820         /* "lxml/objectify.pyx":1166
18821  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18822  *                 if elementMaker._element_factory is None:
18823  *                     cetree.makeSubElement(element, elementMaker._tag,             # <<<<<<<<<<<<<<
18824  *                                           None, None, None, None)
18825  *                 else:
18826  */
18827         __pyx_t_4 = __pyx_v_elementMaker->_tag;
18828         __Pyx_INCREF(__pyx_t_4);
18829
18830         /* "lxml/objectify.pyx":1167
18831  *                 if elementMaker._element_factory is None:
18832  *                     cetree.makeSubElement(element, elementMaker._tag,
18833  *                                           None, None, None, None)             # <<<<<<<<<<<<<<
18834  *                 else:
18835  *                     childElement = elementMaker._element_factory(
18836  */
18837         __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)
18838         __Pyx_GOTREF(__pyx_t_7);
18839         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18840         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18841
18842         /* "lxml/objectify.pyx":1165
18843  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18844  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18845  *                 if elementMaker._element_factory is None:             # <<<<<<<<<<<<<<
18846  *                     cetree.makeSubElement(element, elementMaker._tag,
18847  *                                           None, None, None, None)
18848  */
18849         goto __pyx_L8;
18850       }
18851
18852       /* "lxml/objectify.pyx":1169
18853  *                                           None, None, None, None)
18854  *                 else:
18855  *                     childElement = elementMaker._element_factory(             # <<<<<<<<<<<<<<
18856  *                         elementMaker._tag)
18857  *                     cetree.appendChildToElement(element, childElement)
18858  */
18859       /*else*/ {
18860
18861         /* "lxml/objectify.pyx":1170
18862  *                 else:
18863  *                     childElement = elementMaker._element_factory(
18864  *                         elementMaker._tag)             # <<<<<<<<<<<<<<
18865  *                     cetree.appendChildToElement(element, childElement)
18866  *                 has_children = True
18867  */
18868         __Pyx_INCREF(__pyx_v_elementMaker->_element_factory);
18869         __pyx_t_4 = __pyx_v_elementMaker->_element_factory; __pyx_t_3 = NULL;
18870         if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
18871           __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
18872           if (likely(__pyx_t_3)) {
18873             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18874             __Pyx_INCREF(__pyx_t_3);
18875             __Pyx_INCREF(function);
18876             __Pyx_DECREF_SET(__pyx_t_4, function);
18877           }
18878         }
18879         __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);
18880         __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18881         if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error)
18882         __Pyx_GOTREF(__pyx_t_7);
18883         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18884
18885         /* "lxml/objectify.pyx":1169
18886  *                                           None, None, None, None)
18887  *                 else:
18888  *                     childElement = elementMaker._element_factory(             # <<<<<<<<<<<<<<
18889  *                         elementMaker._tag)
18890  *                     cetree.appendChildToElement(element, childElement)
18891  */
18892         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)
18893         __Pyx_XDECREF_SET(__pyx_v_childElement, ((struct LxmlElement *)__pyx_t_7));
18894         __pyx_t_7 = 0;
18895
18896         /* "lxml/objectify.pyx":1171
18897  *                     childElement = elementMaker._element_factory(
18898  *                         elementMaker._tag)
18899  *                     cetree.appendChildToElement(element, childElement)             # <<<<<<<<<<<<<<
18900  *                 has_children = True
18901  *             elif isinstance(child, dict):
18902  */
18903         __pyx_t_6 = appendChildToElement(__pyx_v_element, __pyx_v_childElement); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1171, __pyx_L1_error)
18904       }
18905       __pyx_L8:;
18906
18907       /* "lxml/objectify.pyx":1172
18908  *                         elementMaker._tag)
18909  *                     cetree.appendChildToElement(element, childElement)
18910  *                 has_children = True             # <<<<<<<<<<<<<<
18911  *             elif isinstance(child, dict):
18912  *                 for name, value in child.items():
18913  */
18914       __pyx_v_has_children = 1;
18915
18916       /* "lxml/objectify.pyx":1163
18917  *                 cetree.appendChildToElement(element, <_Element>child)
18918  *                 has_children = True
18919  *             elif isinstance(child, _ObjectifyElementMakerCaller):             # <<<<<<<<<<<<<<
18920  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18921  *                 if elementMaker._element_factory is None:
18922  */
18923       goto __pyx_L6;
18924     }
18925
18926     /* "lxml/objectify.pyx":1173
18927  *                     cetree.appendChildToElement(element, childElement)
18928  *                 has_children = True
18929  *             elif isinstance(child, dict):             # <<<<<<<<<<<<<<
18930  *                 for name, value in child.items():
18931  *                     # keyword arguments in attrib take precedence
18932  */
18933     __pyx_t_2 = PyDict_Check(__pyx_v_child); 
18934     __pyx_t_1 = (__pyx_t_2 != 0);
18935     if (__pyx_t_1) {
18936
18937       /* "lxml/objectify.pyx":1174
18938  *                 has_children = True
18939  *             elif isinstance(child, dict):
18940  *                 for name, value in child.items():             # <<<<<<<<<<<<<<
18941  *                     # keyword arguments in attrib take precedence
18942  *                     if name in attrib:
18943  */
18944       __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)
18945       __Pyx_GOTREF(__pyx_t_4);
18946       __pyx_t_3 = NULL;
18947       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
18948         __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
18949         if (likely(__pyx_t_3)) {
18950           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18951           __Pyx_INCREF(__pyx_t_3);
18952           __Pyx_INCREF(function);
18953           __Pyx_DECREF_SET(__pyx_t_4, function);
18954         }
18955       }
18956       __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
18957       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18958       if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
18959       __Pyx_GOTREF(__pyx_t_7);
18960       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18961       if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
18962         __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
18963         __pyx_t_10 = NULL;
18964       } else {
18965         __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
18966         __Pyx_GOTREF(__pyx_t_4);
18967         __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1174, __pyx_L1_error)
18968       }
18969       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18970       for (;;) {
18971         if (likely(!__pyx_t_10)) {
18972           if (likely(PyList_CheckExact(__pyx_t_4))) {
18973             if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
18974             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18975             __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)
18976             #else
18977             __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)
18978             __Pyx_GOTREF(__pyx_t_7);
18979             #endif
18980           } else {
18981             if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
18982             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18983             __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)
18984             #else
18985             __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)
18986             __Pyx_GOTREF(__pyx_t_7);
18987             #endif
18988           }
18989         } else {
18990           __pyx_t_7 = __pyx_t_10(__pyx_t_4);
18991           if (unlikely(!__pyx_t_7)) {
18992             PyObject* exc_type = PyErr_Occurred();
18993             if (exc_type) {
18994               if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18995               else __PYX_ERR(0, 1174, __pyx_L1_error)
18996             }
18997             break;
18998           }
18999           __Pyx_GOTREF(__pyx_t_7);
19000         }
19001         if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
19002           PyObject* sequence = __pyx_t_7;
19003           Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
19004           if (unlikely(size != 2)) {
19005             if (size > 2) __Pyx_RaiseTooManyValuesError(2);
19006             else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
19007             __PYX_ERR(0, 1174, __pyx_L1_error)
19008           }
19009           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19010           if (likely(PyTuple_CheckExact(sequence))) {
19011             __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
19012             __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); 
19013           } else {
19014             __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
19015             __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
19016           }
19017           __Pyx_INCREF(__pyx_t_3);
19018           __Pyx_INCREF(__pyx_t_11);
19019           #else
19020           __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error)
19021           __Pyx_GOTREF(__pyx_t_3);
19022           __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1174, __pyx_L1_error)
19023           __Pyx_GOTREF(__pyx_t_11);
19024           #endif
19025           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19026         } else {
19027           Py_ssize_t index = -1;
19028           __pyx_t_12 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1174, __pyx_L1_error)
19029           __Pyx_GOTREF(__pyx_t_12);
19030           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19031           __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
19032           index = 0; __pyx_t_3 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
19033           __Pyx_GOTREF(__pyx_t_3);
19034           index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L11_unpacking_failed;
19035           __Pyx_GOTREF(__pyx_t_11);
19036           if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 1174, __pyx_L1_error)
19037           __pyx_t_13 = NULL;
19038           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
19039           goto __pyx_L12_unpacking_done;
19040           __pyx_L11_unpacking_failed:;
19041           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
19042           __pyx_t_13 = NULL;
19043           if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
19044           __PYX_ERR(0, 1174, __pyx_L1_error)
19045           __pyx_L12_unpacking_done:;
19046         }
19047         __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
19048         __pyx_t_3 = 0;
19049         __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11);
19050         __pyx_t_11 = 0;
19051
19052         /* "lxml/objectify.pyx":1176
19053  *                 for name, value in child.items():
19054  *                     # keyword arguments in attrib take precedence
19055  *                     if name in attrib:             # <<<<<<<<<<<<<<
19056  *                         continue
19057  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19058  */
19059         __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)
19060         __pyx_t_2 = (__pyx_t_1 != 0);
19061         if (__pyx_t_2) {
19062
19063           /* "lxml/objectify.pyx":1177
19064  *                     # keyword arguments in attrib take precedence
19065  *                     if name in attrib:
19066  *                         continue             # <<<<<<<<<<<<<<
19067  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19068  *                     if pytype is not None:
19069  */
19070           goto __pyx_L9_continue;
19071
19072           /* "lxml/objectify.pyx":1176
19073  *                 for name, value in child.items():
19074  *                     # keyword arguments in attrib take precedence
19075  *                     if name in attrib:             # <<<<<<<<<<<<<<
19076  *                         continue
19077  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19078  */
19079         }
19080
19081         /* "lxml/objectify.pyx":1178
19082  *                     if name in attrib:
19083  *                         continue
19084  *                     pytype = _PYTYPE_DICT.get(_typename(value))             # <<<<<<<<<<<<<<
19085  *                     if pytype is not None:
19086  *                         value = (<PyType>pytype).stringify(value)
19087  */
19088         if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
19089           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
19090           __PYX_ERR(0, 1178, __pyx_L1_error)
19091         }
19092         __pyx_t_7 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1178, __pyx_L1_error)
19093         __Pyx_GOTREF(__pyx_t_7);
19094         __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)
19095         __Pyx_GOTREF(__pyx_t_11);
19096         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19097         __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_11);
19098         __pyx_t_11 = 0;
19099
19100         /* "lxml/objectify.pyx":1179
19101  *                         continue
19102  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19103  *                     if pytype is not None:             # <<<<<<<<<<<<<<
19104  *                         value = (<PyType>pytype).stringify(value)
19105  *                     elif not python._isString(value):
19106  */
19107         __pyx_t_2 = (__pyx_v_pytype != Py_None);
19108         __pyx_t_1 = (__pyx_t_2 != 0);
19109         if (__pyx_t_1) {
19110
19111           /* "lxml/objectify.pyx":1180
19112  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19113  *                     if pytype is not None:
19114  *                         value = (<PyType>pytype).stringify(value)             # <<<<<<<<<<<<<<
19115  *                     elif not python._isString(value):
19116  *                         value = unicode(value)
19117  */
19118           __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify);
19119           __pyx_t_7 = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify; __pyx_t_3 = NULL;
19120           if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
19121             __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
19122             if (likely(__pyx_t_3)) {
19123               PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
19124               __Pyx_INCREF(__pyx_t_3);
19125               __Pyx_INCREF(function);
19126               __Pyx_DECREF_SET(__pyx_t_7, function);
19127             }
19128           }
19129           __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);
19130           __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19131           if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1180, __pyx_L1_error)
19132           __Pyx_GOTREF(__pyx_t_11);
19133           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19134           __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_11);
19135           __pyx_t_11 = 0;
19136
19137           /* "lxml/objectify.pyx":1179
19138  *                         continue
19139  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19140  *                     if pytype is not None:             # <<<<<<<<<<<<<<
19141  *                         value = (<PyType>pytype).stringify(value)
19142  *                     elif not python._isString(value):
19143  */
19144           goto __pyx_L14;
19145         }
19146
19147         /* "lxml/objectify.pyx":1181
19148  *                     if pytype is not None:
19149  *                         value = (<PyType>pytype).stringify(value)
19150  *                     elif not python._isString(value):             # <<<<<<<<<<<<<<
19151  *                         value = unicode(value)
19152  *                     cetree.setAttributeValue(element, name, value)
19153  */
19154         __pyx_t_1 = ((!(_isString(__pyx_v_value) != 0)) != 0);
19155         if (__pyx_t_1) {
19156
19157           /* "lxml/objectify.pyx":1182
19158  *                         value = (<PyType>pytype).stringify(value)
19159  *                     elif not python._isString(value):
19160  *                         value = unicode(value)             # <<<<<<<<<<<<<<
19161  *                     cetree.setAttributeValue(element, name, value)
19162  *             else:
19163  */
19164           __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1182, __pyx_L1_error)
19165           __Pyx_GOTREF(__pyx_t_11);
19166           __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_11);
19167           __pyx_t_11 = 0;
19168
19169           /* "lxml/objectify.pyx":1181
19170  *                     if pytype is not None:
19171  *                         value = (<PyType>pytype).stringify(value)
19172  *                     elif not python._isString(value):             # <<<<<<<<<<<<<<
19173  *                         value = unicode(value)
19174  *                     cetree.setAttributeValue(element, name, value)
19175  */
19176         }
19177         __pyx_L14:;
19178
19179         /* "lxml/objectify.pyx":1183
19180  *                     elif not python._isString(value):
19181  *                         value = unicode(value)
19182  *                     cetree.setAttributeValue(element, name, value)             # <<<<<<<<<<<<<<
19183  *             else:
19184  *                 if pytype_name is not None:
19185  */
19186         __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)
19187
19188         /* "lxml/objectify.pyx":1174
19189  *                 has_children = True
19190  *             elif isinstance(child, dict):
19191  *                 for name, value in child.items():             # <<<<<<<<<<<<<<
19192  *                     # keyword arguments in attrib take precedence
19193  *                     if name in attrib:
19194  */
19195         __pyx_L9_continue:;
19196       }
19197       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19198
19199       /* "lxml/objectify.pyx":1173
19200  *                     cetree.appendChildToElement(element, childElement)
19201  *                 has_children = True
19202  *             elif isinstance(child, dict):             # <<<<<<<<<<<<<<
19203  *                 for name, value in child.items():
19204  *                     # keyword arguments in attrib take precedence
19205  */
19206       goto __pyx_L6;
19207     }
19208
19209     /* "lxml/objectify.pyx":1185
19210  *                     cetree.setAttributeValue(element, name, value)
19211  *             else:
19212  *                 if pytype_name is not None:             # <<<<<<<<<<<<<<
19213  *                     # concatenation always makes the result a string
19214  *                     has_string_value = True
19215  */
19216     /*else*/ {
19217       __pyx_t_1 = (__pyx_v_pytype_name != Py_None);
19218       __pyx_t_2 = (__pyx_t_1 != 0);
19219       if (__pyx_t_2) {
19220
19221         /* "lxml/objectify.pyx":1187
19222  *                 if pytype_name is not None:
19223  *                     # concatenation always makes the result a string
19224  *                     has_string_value = True             # <<<<<<<<<<<<<<
19225  *                 pytype_name = _typename(child)
19226  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19227  */
19228         __pyx_v_has_string_value = 1;
19229
19230         /* "lxml/objectify.pyx":1185
19231  *                     cetree.setAttributeValue(element, name, value)
19232  *             else:
19233  *                 if pytype_name is not None:             # <<<<<<<<<<<<<<
19234  *                     # concatenation always makes the result a string
19235  *                     has_string_value = True
19236  */
19237       }
19238
19239       /* "lxml/objectify.pyx":1188
19240  *                     # concatenation always makes the result a string
19241  *                     has_string_value = True
19242  *                 pytype_name = _typename(child)             # <<<<<<<<<<<<<<
19243  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19244  *                 if pytype is not None:
19245  */
19246       __pyx_t_4 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error)
19247       __Pyx_GOTREF(__pyx_t_4);
19248       __Pyx_DECREF_SET(__pyx_v_pytype_name, __pyx_t_4);
19249       __pyx_t_4 = 0;
19250
19251       /* "lxml/objectify.pyx":1189
19252  *                     has_string_value = True
19253  *                 pytype_name = _typename(child)
19254  *                 pytype = _PYTYPE_DICT.get(_typename(child))             # <<<<<<<<<<<<<<
19255  *                 if pytype is not None:
19256  *                     _add_text(element, (<PyType>pytype).stringify(child))
19257  */
19258       if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
19259         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
19260         __PYX_ERR(0, 1189, __pyx_L1_error)
19261       }
19262       __pyx_t_4 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error)
19263       __Pyx_GOTREF(__pyx_t_4);
19264       __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)
19265       __Pyx_GOTREF(__pyx_t_11);
19266       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19267       __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_11);
19268       __pyx_t_11 = 0;
19269
19270       /* "lxml/objectify.pyx":1190
19271  *                 pytype_name = _typename(child)
19272  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19273  *                 if pytype is not None:             # <<<<<<<<<<<<<<
19274  *                     _add_text(element, (<PyType>pytype).stringify(child))
19275  *                 else:
19276  */
19277       __pyx_t_2 = (__pyx_v_pytype != Py_None);
19278       __pyx_t_1 = (__pyx_t_2 != 0);
19279       if (__pyx_t_1) {
19280
19281         /* "lxml/objectify.pyx":1191
19282  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19283  *                 if pytype is not None:
19284  *                     _add_text(element, (<PyType>pytype).stringify(child))             # <<<<<<<<<<<<<<
19285  *                 else:
19286  *                     has_string_value = True
19287  */
19288         __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify);
19289         __pyx_t_4 = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify; __pyx_t_7 = NULL;
19290         if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
19291           __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
19292           if (likely(__pyx_t_7)) {
19293             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
19294             __Pyx_INCREF(__pyx_t_7);
19295             __Pyx_INCREF(function);
19296             __Pyx_DECREF_SET(__pyx_t_4, function);
19297           }
19298         }
19299         __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);
19300         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
19301         if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1191, __pyx_L1_error)
19302         __Pyx_GOTREF(__pyx_t_11);
19303         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19304         __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)
19305         __Pyx_GOTREF(__pyx_t_4);
19306         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19307         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19308
19309         /* "lxml/objectify.pyx":1190
19310  *                 pytype_name = _typename(child)
19311  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19312  *                 if pytype is not None:             # <<<<<<<<<<<<<<
19313  *                     _add_text(element, (<PyType>pytype).stringify(child))
19314  *                 else:
19315  */
19316         goto __pyx_L16;
19317       }
19318
19319       /* "lxml/objectify.pyx":1193
19320  *                     _add_text(element, (<PyType>pytype).stringify(child))
19321  *                 else:
19322  *                     has_string_value = True             # <<<<<<<<<<<<<<
19323  *                     child = unicode(child)
19324  *                     _add_text(element, child)
19325  */
19326       /*else*/ {
19327         __pyx_v_has_string_value = 1;
19328
19329         /* "lxml/objectify.pyx":1194
19330  *                 else:
19331  *                     has_string_value = True
19332  *                     child = unicode(child)             # <<<<<<<<<<<<<<
19333  *                     _add_text(element, child)
19334  * 
19335  */
19336         __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error)
19337         __Pyx_GOTREF(__pyx_t_4);
19338         __Pyx_DECREF_SET(__pyx_v_child, __pyx_t_4);
19339         __pyx_t_4 = 0;
19340
19341         /* "lxml/objectify.pyx":1195
19342  *                     has_string_value = True
19343  *                     child = unicode(child)
19344  *                     _add_text(element, child)             # <<<<<<<<<<<<<<
19345  * 
19346  *         if self._annotate and not has_children:
19347  */
19348         __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)
19349         __Pyx_GOTREF(__pyx_t_4);
19350         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19351       }
19352       __pyx_L16:;
19353     }
19354     __pyx_L6:;
19355
19356     /* "lxml/objectify.pyx":1152
19357  *         has_children = False
19358  *         has_string_value = False
19359  *         for child in children:             # <<<<<<<<<<<<<<
19360  *             if child is None:
19361  *                 if len(children) == 1:
19362  */
19363   }
19364   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19365
19366   /* "lxml/objectify.pyx":1197
19367  *                     _add_text(element, child)
19368  * 
19369  *         if self._annotate and not has_children:             # <<<<<<<<<<<<<<
19370  *             if has_string_value:
19371  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19372  */
19373   __pyx_t_2 = (__pyx_v_self->_annotate != 0);
19374   if (__pyx_t_2) {
19375   } else {
19376     __pyx_t_1 = __pyx_t_2;
19377     goto __pyx_L18_bool_binop_done;
19378   }
19379   __pyx_t_2 = ((!(__pyx_v_has_children != 0)) != 0);
19380   __pyx_t_1 = __pyx_t_2;
19381   __pyx_L18_bool_binop_done:;
19382   if (__pyx_t_1) {
19383
19384     /* "lxml/objectify.pyx":1198
19385  * 
19386  *         if self._annotate and not has_children:
19387  *             if has_string_value:             # <<<<<<<<<<<<<<
19388  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19389  *             elif pytype_name is not None:
19390  */
19391     __pyx_t_1 = (__pyx_v_has_string_value != 0);
19392     if (__pyx_t_1) {
19393
19394       /* "lxml/objectify.pyx":1199
19395  *         if self._annotate and not has_children:
19396  *             if has_string_value:
19397  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")             # <<<<<<<<<<<<<<
19398  *             elif pytype_name is not None:
19399  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
19400  */
19401       __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error)
19402       __Pyx_GOTREF(__pyx_t_5);
19403       __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)
19404       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19405
19406       /* "lxml/objectify.pyx":1198
19407  * 
19408  *         if self._annotate and not has_children:
19409  *             if has_string_value:             # <<<<<<<<<<<<<<
19410  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19411  *             elif pytype_name is not None:
19412  */
19413       goto __pyx_L20;
19414     }
19415
19416     /* "lxml/objectify.pyx":1200
19417  *             if has_string_value:
19418  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19419  *             elif pytype_name is not None:             # <<<<<<<<<<<<<<
19420  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
19421  * 
19422  */
19423     __pyx_t_1 = (__pyx_v_pytype_name != Py_None);
19424     __pyx_t_2 = (__pyx_t_1 != 0);
19425     if (__pyx_t_2) {
19426
19427       /* "lxml/objectify.pyx":1201
19428  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19429  *             elif pytype_name is not None:
19430  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<<
19431  * 
19432  *         return element
19433  */
19434       __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error)
19435       __Pyx_GOTREF(__pyx_t_5);
19436       __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)
19437       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19438
19439       /* "lxml/objectify.pyx":1200
19440  *             if has_string_value:
19441  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19442  *             elif pytype_name is not None:             # <<<<<<<<<<<<<<
19443  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
19444  * 
19445  */
19446     }
19447     __pyx_L20:;
19448
19449     /* "lxml/objectify.pyx":1197
19450  *                     _add_text(element, child)
19451  * 
19452  *         if self._annotate and not has_children:             # <<<<<<<<<<<<<<
19453  *             if has_string_value:
19454  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19455  */
19456   }
19457
19458   /* "lxml/objectify.pyx":1203
19459  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
19460  * 
19461  *         return element             # <<<<<<<<<<<<<<
19462  * 
19463  * cdef _add_text(_Element elem, text):
19464  */
19465   __Pyx_XDECREF(__pyx_r);
19466   __Pyx_INCREF(((PyObject *)__pyx_v_element));
19467   __pyx_r = ((PyObject *)__pyx_v_element);
19468   goto __pyx_L0;
19469
19470   /* "lxml/objectify.pyx":1137
19471  *     cdef bint _annotate
19472  * 
19473  *     def __call__(self, *children, **attrib):             # <<<<<<<<<<<<<<
19474  *         u"__call__(self, *children, **attrib)"
19475  *         cdef _ObjectifyElementMakerCaller elementMaker
19476  */
19477
19478   /* function exit code */
19479   __pyx_L1_error:;
19480   __Pyx_XDECREF(__pyx_t_3);
19481   __Pyx_XDECREF(__pyx_t_4);
19482   __Pyx_XDECREF(__pyx_t_5);
19483   __Pyx_XDECREF(__pyx_t_7);
19484   __Pyx_XDECREF(__pyx_t_11);
19485   __Pyx_XDECREF(__pyx_t_12);
19486   __Pyx_AddTraceback("lxml.objectify._ObjectifyElementMakerCaller.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19487   __pyx_r = NULL;
19488   __pyx_L0:;
19489   __Pyx_XDECREF((PyObject *)__pyx_v_elementMaker);
19490   __Pyx_XDECREF((PyObject *)__pyx_v_element);
19491   __Pyx_XDECREF((PyObject *)__pyx_v_childElement);
19492   __Pyx_XDECREF(__pyx_v_pytype_name);
19493   __Pyx_XDECREF(__pyx_v_child);
19494   __Pyx_XDECREF(__pyx_v_name);
19495   __Pyx_XDECREF(__pyx_v_value);
19496   __Pyx_XDECREF(__pyx_v_pytype);
19497   __Pyx_XGIVEREF(__pyx_r);
19498   __Pyx_RefNannyFinishContext();
19499   return __pyx_r;
19500 }
19501
19502 /* "lxml/objectify.pyx":1205
19503  *         return element
19504  * 
19505  * cdef _add_text(_Element elem, text):             # <<<<<<<<<<<<<<
19506  *     # add text to the tree in construction, either as element text or
19507  *     # tail text, depending on the current tree state
19508  */
19509
19510 static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_elem, PyObject *__pyx_v_text) {
19511   xmlNode *__pyx_v_c_child;
19512   PyObject *__pyx_v_old = NULL;
19513   PyObject *__pyx_r = NULL;
19514   __Pyx_RefNannyDeclarations
19515   int __pyx_t_1;
19516   PyObject *__pyx_t_2 = NULL;
19517   int __pyx_t_3;
19518   int __pyx_t_4;
19519   int __pyx_lineno = 0;
19520   const char *__pyx_filename = NULL;
19521   int __pyx_clineno = 0;
19522   __Pyx_RefNannySetupContext("_add_text", 0);
19523   __Pyx_INCREF(__pyx_v_text);
19524
19525   /* "lxml/objectify.pyx":1209
19526  *     # tail text, depending on the current tree state
19527  *     cdef tree.xmlNode* c_child
19528  *     c_child = cetree.findChildBackwards(elem._c_node, 0)             # <<<<<<<<<<<<<<
19529  *     if c_child is not NULL:
19530  *         old = cetree.tailOf(c_child)
19531  */
19532   __pyx_v_c_child = findChildBackwards(__pyx_v_elem->_c_node, 0);
19533
19534   /* "lxml/objectify.pyx":1210
19535  *     cdef tree.xmlNode* c_child
19536  *     c_child = cetree.findChildBackwards(elem._c_node, 0)
19537  *     if c_child is not NULL:             # <<<<<<<<<<<<<<
19538  *         old = cetree.tailOf(c_child)
19539  *         if old is not None:
19540  */
19541   __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0);
19542   if (__pyx_t_1) {
19543
19544     /* "lxml/objectify.pyx":1211
19545  *     c_child = cetree.findChildBackwards(elem._c_node, 0)
19546  *     if c_child is not NULL:
19547  *         old = cetree.tailOf(c_child)             # <<<<<<<<<<<<<<
19548  *         if old is not None:
19549  *             text = old + text
19550  */
19551     __pyx_t_2 = tailOf(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1211, __pyx_L1_error)
19552     __Pyx_GOTREF(__pyx_t_2);
19553     __pyx_v_old = __pyx_t_2;
19554     __pyx_t_2 = 0;
19555
19556     /* "lxml/objectify.pyx":1212
19557  *     if c_child is not NULL:
19558  *         old = cetree.tailOf(c_child)
19559  *         if old is not None:             # <<<<<<<<<<<<<<
19560  *             text = old + text
19561  *         cetree.setTailText(c_child, text)
19562  */
19563     __pyx_t_1 = (__pyx_v_old != Py_None);
19564     __pyx_t_3 = (__pyx_t_1 != 0);
19565     if (__pyx_t_3) {
19566
19567       /* "lxml/objectify.pyx":1213
19568  *         old = cetree.tailOf(c_child)
19569  *         if old is not None:
19570  *             text = old + text             # <<<<<<<<<<<<<<
19571  *         cetree.setTailText(c_child, text)
19572  *     else:
19573  */
19574       __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L1_error)
19575       __Pyx_GOTREF(__pyx_t_2);
19576       __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_2);
19577       __pyx_t_2 = 0;
19578
19579       /* "lxml/objectify.pyx":1212
19580  *     if c_child is not NULL:
19581  *         old = cetree.tailOf(c_child)
19582  *         if old is not None:             # <<<<<<<<<<<<<<
19583  *             text = old + text
19584  *         cetree.setTailText(c_child, text)
19585  */
19586     }
19587
19588     /* "lxml/objectify.pyx":1214
19589  *         if old is not None:
19590  *             text = old + text
19591  *         cetree.setTailText(c_child, text)             # <<<<<<<<<<<<<<
19592  *     else:
19593  *         old = cetree.textOf(elem._c_node)
19594  */
19595     __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)
19596
19597     /* "lxml/objectify.pyx":1210
19598  *     cdef tree.xmlNode* c_child
19599  *     c_child = cetree.findChildBackwards(elem._c_node, 0)
19600  *     if c_child is not NULL:             # <<<<<<<<<<<<<<
19601  *         old = cetree.tailOf(c_child)
19602  *         if old is not None:
19603  */
19604     goto __pyx_L3;
19605   }
19606
19607   /* "lxml/objectify.pyx":1216
19608  *         cetree.setTailText(c_child, text)
19609  *     else:
19610  *         old = cetree.textOf(elem._c_node)             # <<<<<<<<<<<<<<
19611  *         if old is not None:
19612  *             text = old + text
19613  */
19614   /*else*/ {
19615     __pyx_t_2 = textOf(__pyx_v_elem->_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error)
19616     __Pyx_GOTREF(__pyx_t_2);
19617     __pyx_v_old = __pyx_t_2;
19618     __pyx_t_2 = 0;
19619
19620     /* "lxml/objectify.pyx":1217
19621  *     else:
19622  *         old = cetree.textOf(elem._c_node)
19623  *         if old is not None:             # <<<<<<<<<<<<<<
19624  *             text = old + text
19625  *         cetree.setNodeText(elem._c_node, text)
19626  */
19627     __pyx_t_3 = (__pyx_v_old != Py_None);
19628     __pyx_t_1 = (__pyx_t_3 != 0);
19629     if (__pyx_t_1) {
19630
19631       /* "lxml/objectify.pyx":1218
19632  *         old = cetree.textOf(elem._c_node)
19633  *         if old is not None:
19634  *             text = old + text             # <<<<<<<<<<<<<<
19635  *         cetree.setNodeText(elem._c_node, text)
19636  * 
19637  */
19638       __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
19639       __Pyx_GOTREF(__pyx_t_2);
19640       __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_2);
19641       __pyx_t_2 = 0;
19642
19643       /* "lxml/objectify.pyx":1217
19644  *     else:
19645  *         old = cetree.textOf(elem._c_node)
19646  *         if old is not None:             # <<<<<<<<<<<<<<
19647  *             text = old + text
19648  *         cetree.setNodeText(elem._c_node, text)
19649  */
19650     }
19651
19652     /* "lxml/objectify.pyx":1219
19653  *         if old is not None:
19654  *             text = old + text
19655  *         cetree.setNodeText(elem._c_node, text)             # <<<<<<<<<<<<<<
19656  * 
19657  * cdef class ElementMaker:
19658  */
19659     __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)
19660   }
19661   __pyx_L3:;
19662
19663   /* "lxml/objectify.pyx":1205
19664  *         return element
19665  * 
19666  * cdef _add_text(_Element elem, text):             # <<<<<<<<<<<<<<
19667  *     # add text to the tree in construction, either as element text or
19668  *     # tail text, depending on the current tree state
19669  */
19670
19671   /* function exit code */
19672   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19673   goto __pyx_L0;
19674   __pyx_L1_error:;
19675   __Pyx_XDECREF(__pyx_t_2);
19676   __Pyx_AddTraceback("lxml.objectify._add_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
19677   __pyx_r = 0;
19678   __pyx_L0:;
19679   __Pyx_XDECREF(__pyx_v_old);
19680   __Pyx_XDECREF(__pyx_v_text);
19681   __Pyx_XGIVEREF(__pyx_r);
19682   __Pyx_RefNannyFinishContext();
19683   return __pyx_r;
19684 }
19685
19686 /* "lxml/objectify.pyx":1252
19687  *     cdef bint _annotate
19688  *     cdef dict _cache
19689  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
19690  *                  makeelement=None):
19691  *         if nsmap is None:
19692  */
19693
19694 /* Python wrapper */
19695 static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19696 static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19697   PyObject *__pyx_v_namespace = 0;
19698   PyObject *__pyx_v_nsmap = 0;
19699   PyObject *__pyx_v_annotate = 0;
19700   PyObject *__pyx_v_makeelement = 0;
19701   int __pyx_lineno = 0;
19702   const char *__pyx_filename = NULL;
19703   int __pyx_clineno = 0;
19704   int __pyx_r;
19705   __Pyx_RefNannyDeclarations
19706   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
19707   {
19708     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_namespace,&__pyx_n_s_nsmap,&__pyx_n_s_annotate,&__pyx_n_s_makeelement,0};
19709     PyObject* values[4] = {0,0,0,0};
19710     values[0] = ((PyObject *)Py_None);
19711     values[1] = ((PyObject *)Py_None);
19712     values[2] = ((PyObject *)Py_True);
19713
19714     /* "lxml/objectify.pyx":1253
19715  *     cdef dict _cache
19716  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
19717  *                  makeelement=None):             # <<<<<<<<<<<<<<
19718  *         if nsmap is None:
19719  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19720  */
19721     values[3] = ((PyObject *)Py_None);
19722     if (unlikely(__pyx_kwds)) {
19723       Py_ssize_t kw_args;
19724       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19725       switch (pos_args) {
19726         case  0: break;
19727         default: goto __pyx_L5_argtuple_error;
19728       }
19729       kw_args = PyDict_Size(__pyx_kwds);
19730       if (kw_args > 0 && likely(kw_args <= 4)) {
19731         Py_ssize_t index;
19732         for (index = 0; index < 4 && kw_args > 0; index++) {
19733           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
19734           if (value) { values[index] = value; kw_args--; }
19735         }
19736       }
19737       if (unlikely(kw_args > 0)) {
19738         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) __PYX_ERR(0, 1252, __pyx_L3_error)
19739       }
19740     } else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
19741       goto __pyx_L5_argtuple_error;
19742     } else {
19743     }
19744     __pyx_v_namespace = values[0];
19745     __pyx_v_nsmap = values[1];
19746     __pyx_v_annotate = values[2];
19747     __pyx_v_makeelement = values[3];
19748   }
19749   goto __pyx_L4_argument_unpacking_done;
19750   __pyx_L5_argtuple_error:;
19751   __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1252, __pyx_L3_error)
19752   __pyx_L3_error:;
19753   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19754   __Pyx_RefNannyFinishContext();
19755   return -1;
19756   __pyx_L4_argument_unpacking_done:;
19757   __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);
19758
19759   /* "lxml/objectify.pyx":1252
19760  *     cdef bint _annotate
19761  *     cdef dict _cache
19762  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
19763  *                  makeelement=None):
19764  *         if nsmap is None:
19765  */
19766
19767   /* function exit code */
19768   __Pyx_RefNannyFinishContext();
19769   return __pyx_r;
19770 }
19771
19772 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) {
19773   int __pyx_r;
19774   __Pyx_RefNannyDeclarations
19775   int __pyx_t_1;
19776   int __pyx_t_2;
19777   PyObject *__pyx_t_3 = NULL;
19778   PyObject *__pyx_t_4 = NULL;
19779   int __pyx_lineno = 0;
19780   const char *__pyx_filename = NULL;
19781   int __pyx_clineno = 0;
19782   __Pyx_RefNannySetupContext("__init__", 0);
19783   __Pyx_INCREF(__pyx_v_nsmap);
19784
19785   /* "lxml/objectify.pyx":1254
19786  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
19787  *                  makeelement=None):
19788  *         if nsmap is None:             # <<<<<<<<<<<<<<
19789  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19790  *         self._nsmap = nsmap
19791  */
19792   __pyx_t_1 = (__pyx_v_nsmap == Py_None);
19793   __pyx_t_2 = (__pyx_t_1 != 0);
19794   if (__pyx_t_2) {
19795
19796     /* "lxml/objectify.pyx":1255
19797  *                  makeelement=None):
19798  *         if nsmap is None:
19799  *             nsmap = _DEFAULT_NSMAP if annotate else {}             # <<<<<<<<<<<<<<
19800  *         self._nsmap = nsmap
19801  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19802  */
19803     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1255, __pyx_L1_error)
19804     if (__pyx_t_2) {
19805       __Pyx_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
19806       __pyx_t_3 = __pyx_v_4lxml_9objectify__DEFAULT_NSMAP;
19807     } else {
19808       __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error)
19809       __Pyx_GOTREF(__pyx_t_4);
19810       __pyx_t_3 = __pyx_t_4;
19811       __pyx_t_4 = 0;
19812     }
19813     __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_t_3);
19814     __pyx_t_3 = 0;
19815
19816     /* "lxml/objectify.pyx":1254
19817  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
19818  *                  makeelement=None):
19819  *         if nsmap is None:             # <<<<<<<<<<<<<<
19820  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19821  *         self._nsmap = nsmap
19822  */
19823   }
19824
19825   /* "lxml/objectify.pyx":1256
19826  *         if nsmap is None:
19827  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19828  *         self._nsmap = nsmap             # <<<<<<<<<<<<<<
19829  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19830  *         self._annotate = annotate
19831  */
19832   __Pyx_INCREF(__pyx_v_nsmap);
19833   __Pyx_GIVEREF(__pyx_v_nsmap);
19834   __Pyx_GOTREF(__pyx_v_self->_nsmap);
19835   __Pyx_DECREF(__pyx_v_self->_nsmap);
19836   __pyx_v_self->_nsmap = __pyx_v_nsmap;
19837
19838   /* "lxml/objectify.pyx":1257
19839  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19840  *         self._nsmap = nsmap
19841  *         self._namespace = None if namespace is None else u"{%s}" % namespace             # <<<<<<<<<<<<<<
19842  *         self._annotate = annotate
19843  *         if makeelement is not None:
19844  */
19845   __pyx_t_2 = (__pyx_v_namespace == Py_None);
19846   if ((__pyx_t_2 != 0)) {
19847     __Pyx_INCREF(Py_None);
19848     __pyx_t_3 = Py_None;
19849   } else {
19850     __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)
19851     __Pyx_GOTREF(__pyx_t_4);
19852     __pyx_t_3 = __pyx_t_4;
19853     __pyx_t_4 = 0;
19854   }
19855   __Pyx_GIVEREF(__pyx_t_3);
19856   __Pyx_GOTREF(__pyx_v_self->_namespace);
19857   __Pyx_DECREF(__pyx_v_self->_namespace);
19858   __pyx_v_self->_namespace = __pyx_t_3;
19859   __pyx_t_3 = 0;
19860
19861   /* "lxml/objectify.pyx":1258
19862  *         self._nsmap = nsmap
19863  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19864  *         self._annotate = annotate             # <<<<<<<<<<<<<<
19865  *         if makeelement is not None:
19866  *             if not callable(makeelement):
19867  */
19868   __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)
19869   __pyx_v_self->_annotate = __pyx_t_2;
19870
19871   /* "lxml/objectify.pyx":1259
19872  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19873  *         self._annotate = annotate
19874  *         if makeelement is not None:             # <<<<<<<<<<<<<<
19875  *             if not callable(makeelement):
19876  *                 raise TypeError(
19877  */
19878   __pyx_t_2 = (__pyx_v_makeelement != Py_None);
19879   __pyx_t_1 = (__pyx_t_2 != 0);
19880   if (__pyx_t_1) {
19881
19882     /* "lxml/objectify.pyx":1260
19883  *         self._annotate = annotate
19884  *         if makeelement is not None:
19885  *             if not callable(makeelement):             # <<<<<<<<<<<<<<
19886  *                 raise TypeError(
19887  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")
19888  */
19889     __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_makeelement); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1260, __pyx_L1_error)
19890     __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
19891     if (unlikely(__pyx_t_2)) {
19892
19893       /* "lxml/objectify.pyx":1262
19894  *             if not callable(makeelement):
19895  *                 raise TypeError(
19896  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")             # <<<<<<<<<<<<<<
19897  *             self._makeelement = makeelement
19898  *         else:
19899  */
19900       __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)
19901       __Pyx_GOTREF(__pyx_t_3);
19902       __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)
19903       __Pyx_GOTREF(__pyx_t_4);
19904       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19905
19906       /* "lxml/objectify.pyx":1261
19907  *         if makeelement is not None:
19908  *             if not callable(makeelement):
19909  *                 raise TypeError(             # <<<<<<<<<<<<<<
19910  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")
19911  *             self._makeelement = makeelement
19912  */
19913       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error)
19914       __Pyx_GOTREF(__pyx_t_3);
19915       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19916       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
19917       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19918       __PYX_ERR(0, 1261, __pyx_L1_error)
19919
19920       /* "lxml/objectify.pyx":1260
19921  *         self._annotate = annotate
19922  *         if makeelement is not None:
19923  *             if not callable(makeelement):             # <<<<<<<<<<<<<<
19924  *                 raise TypeError(
19925  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")
19926  */
19927     }
19928
19929     /* "lxml/objectify.pyx":1263
19930  *                 raise TypeError(
19931  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")
19932  *             self._makeelement = makeelement             # <<<<<<<<<<<<<<
19933  *         else:
19934  *             self._makeelement = None
19935  */
19936     __Pyx_INCREF(__pyx_v_makeelement);
19937     __Pyx_GIVEREF(__pyx_v_makeelement);
19938     __Pyx_GOTREF(__pyx_v_self->_makeelement);
19939     __Pyx_DECREF(__pyx_v_self->_makeelement);
19940     __pyx_v_self->_makeelement = __pyx_v_makeelement;
19941
19942     /* "lxml/objectify.pyx":1259
19943  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19944  *         self._annotate = annotate
19945  *         if makeelement is not None:             # <<<<<<<<<<<<<<
19946  *             if not callable(makeelement):
19947  *                 raise TypeError(
19948  */
19949     goto __pyx_L4;
19950   }
19951
19952   /* "lxml/objectify.pyx":1265
19953  *             self._makeelement = makeelement
19954  *         else:
19955  *             self._makeelement = None             # <<<<<<<<<<<<<<
19956  *         self._cache = {}
19957  * 
19958  */
19959   /*else*/ {
19960     __Pyx_INCREF(Py_None);
19961     __Pyx_GIVEREF(Py_None);
19962     __Pyx_GOTREF(__pyx_v_self->_makeelement);
19963     __Pyx_DECREF(__pyx_v_self->_makeelement);
19964     __pyx_v_self->_makeelement = Py_None;
19965   }
19966   __pyx_L4:;
19967
19968   /* "lxml/objectify.pyx":1266
19969  *         else:
19970  *             self._makeelement = None
19971  *         self._cache = {}             # <<<<<<<<<<<<<<
19972  * 
19973  *     @cython.final
19974  */
19975   __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error)
19976   __Pyx_GOTREF(__pyx_t_3);
19977   __Pyx_GIVEREF(__pyx_t_3);
19978   __Pyx_GOTREF(__pyx_v_self->_cache);
19979   __Pyx_DECREF(__pyx_v_self->_cache);
19980   __pyx_v_self->_cache = ((PyObject*)__pyx_t_3);
19981   __pyx_t_3 = 0;
19982
19983   /* "lxml/objectify.pyx":1252
19984  *     cdef bint _annotate
19985  *     cdef dict _cache
19986  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
19987  *                  makeelement=None):
19988  *         if nsmap is None:
19989  */
19990
19991   /* function exit code */
19992   __pyx_r = 0;
19993   goto __pyx_L0;
19994   __pyx_L1_error:;
19995   __Pyx_XDECREF(__pyx_t_3);
19996   __Pyx_XDECREF(__pyx_t_4);
19997   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19998   __pyx_r = -1;
19999   __pyx_L0:;
20000   __Pyx_XDECREF(__pyx_v_nsmap);
20001   __Pyx_RefNannyFinishContext();
20002   return __pyx_r;
20003 }
20004
20005 /* "lxml/objectify.pyx":1269
20006  * 
20007  *     @cython.final
20008  *     cdef _build_element_maker(self, tag, bint caching):             # <<<<<<<<<<<<<<
20009  *         cdef _ObjectifyElementMakerCaller element_maker
20010  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20011  */
20012
20013 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) {
20014   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_element_maker = 0;
20015   PyObject *__pyx_r = NULL;
20016   __Pyx_RefNannyDeclarations
20017   PyObject *__pyx_t_1 = NULL;
20018   int __pyx_t_2;
20019   int __pyx_t_3;
20020   int __pyx_t_4;
20021   Py_ssize_t __pyx_t_5;
20022   int __pyx_t_6;
20023   int __pyx_lineno = 0;
20024   const char *__pyx_filename = NULL;
20025   int __pyx_clineno = 0;
20026   __Pyx_RefNannySetupContext("_build_element_maker", 0);
20027
20028   /* "lxml/objectify.pyx":1271
20029  *     cdef _build_element_maker(self, tag, bint caching):
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  */
20035   __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)
20036   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
20037   __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_1);
20038   __pyx_t_1 = 0;
20039
20040   /* "lxml/objectify.pyx":1272
20041  *         cdef _ObjectifyElementMakerCaller element_maker
20042  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20043  *         if self._namespace is not None and tag[0] != u"{":             # <<<<<<<<<<<<<<
20044  *             element_maker._tag = self._namespace + tag
20045  *         else:
20046  */
20047   __pyx_t_3 = (__pyx_v_self->_namespace != Py_None);
20048   __pyx_t_4 = (__pyx_t_3 != 0);
20049   if (__pyx_t_4) {
20050   } else {
20051     __pyx_t_2 = __pyx_t_4;
20052     goto __pyx_L4_bool_binop_done;
20053   }
20054   __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)
20055   __Pyx_GOTREF(__pyx_t_1);
20056   __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)
20057   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20058   __pyx_t_2 = __pyx_t_4;
20059   __pyx_L4_bool_binop_done:;
20060   if (__pyx_t_2) {
20061
20062     /* "lxml/objectify.pyx":1273
20063  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20064  *         if self._namespace is not None and tag[0] != u"{":
20065  *             element_maker._tag = self._namespace + tag             # <<<<<<<<<<<<<<
20066  *         else:
20067  *             element_maker._tag = tag
20068  */
20069     __pyx_t_1 = PyNumber_Add(__pyx_v_self->_namespace, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
20070     __Pyx_GOTREF(__pyx_t_1);
20071     __Pyx_GIVEREF(__pyx_t_1);
20072     __Pyx_GOTREF(__pyx_v_element_maker->_tag);
20073     __Pyx_DECREF(__pyx_v_element_maker->_tag);
20074     __pyx_v_element_maker->_tag = __pyx_t_1;
20075     __pyx_t_1 = 0;
20076
20077     /* "lxml/objectify.pyx":1272
20078  *         cdef _ObjectifyElementMakerCaller element_maker
20079  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20080  *         if self._namespace is not None and tag[0] != u"{":             # <<<<<<<<<<<<<<
20081  *             element_maker._tag = self._namespace + tag
20082  *         else:
20083  */
20084     goto __pyx_L3;
20085   }
20086
20087   /* "lxml/objectify.pyx":1275
20088  *             element_maker._tag = self._namespace + tag
20089  *         else:
20090  *             element_maker._tag = tag             # <<<<<<<<<<<<<<
20091  *         element_maker._nsmap = self._nsmap
20092  *         element_maker._annotate = self._annotate
20093  */
20094   /*else*/ {
20095     __Pyx_INCREF(__pyx_v_tag);
20096     __Pyx_GIVEREF(__pyx_v_tag);
20097     __Pyx_GOTREF(__pyx_v_element_maker->_tag);
20098     __Pyx_DECREF(__pyx_v_element_maker->_tag);
20099     __pyx_v_element_maker->_tag = __pyx_v_tag;
20100   }
20101   __pyx_L3:;
20102
20103   /* "lxml/objectify.pyx":1276
20104  *         else:
20105  *             element_maker._tag = tag
20106  *         element_maker._nsmap = self._nsmap             # <<<<<<<<<<<<<<
20107  *         element_maker._annotate = self._annotate
20108  *         element_maker._element_factory = self._makeelement
20109  */
20110   __pyx_t_1 = __pyx_v_self->_nsmap;
20111   __Pyx_INCREF(__pyx_t_1);
20112   __Pyx_GIVEREF(__pyx_t_1);
20113   __Pyx_GOTREF(__pyx_v_element_maker->_nsmap);
20114   __Pyx_DECREF(__pyx_v_element_maker->_nsmap);
20115   __pyx_v_element_maker->_nsmap = __pyx_t_1;
20116   __pyx_t_1 = 0;
20117
20118   /* "lxml/objectify.pyx":1277
20119  *             element_maker._tag = tag
20120  *         element_maker._nsmap = self._nsmap
20121  *         element_maker._annotate = self._annotate             # <<<<<<<<<<<<<<
20122  *         element_maker._element_factory = self._makeelement
20123  *         if caching:
20124  */
20125   __pyx_t_2 = __pyx_v_self->_annotate;
20126   __pyx_v_element_maker->_annotate = __pyx_t_2;
20127
20128   /* "lxml/objectify.pyx":1278
20129  *         element_maker._nsmap = self._nsmap
20130  *         element_maker._annotate = self._annotate
20131  *         element_maker._element_factory = self._makeelement             # <<<<<<<<<<<<<<
20132  *         if caching:
20133  *             if len(self._cache) > 200:
20134  */
20135   __pyx_t_1 = __pyx_v_self->_makeelement;
20136   __Pyx_INCREF(__pyx_t_1);
20137   __Pyx_GIVEREF(__pyx_t_1);
20138   __Pyx_GOTREF(__pyx_v_element_maker->_element_factory);
20139   __Pyx_DECREF(__pyx_v_element_maker->_element_factory);
20140   __pyx_v_element_maker->_element_factory = __pyx_t_1;
20141   __pyx_t_1 = 0;
20142
20143   /* "lxml/objectify.pyx":1279
20144  *         element_maker._annotate = self._annotate
20145  *         element_maker._element_factory = self._makeelement
20146  *         if caching:             # <<<<<<<<<<<<<<
20147  *             if len(self._cache) > 200:
20148  *                 self._cache.clear()
20149  */
20150   __pyx_t_2 = (__pyx_v_caching != 0);
20151   if (__pyx_t_2) {
20152
20153     /* "lxml/objectify.pyx":1280
20154  *         element_maker._element_factory = self._makeelement
20155  *         if caching:
20156  *             if len(self._cache) > 200:             # <<<<<<<<<<<<<<
20157  *                 self._cache.clear()
20158  *             self._cache[tag] = element_maker
20159  */
20160     __pyx_t_1 = __pyx_v_self->_cache;
20161     __Pyx_INCREF(__pyx_t_1);
20162     if (unlikely(__pyx_t_1 == Py_None)) {
20163       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
20164       __PYX_ERR(0, 1280, __pyx_L1_error)
20165     }
20166     __pyx_t_5 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1280, __pyx_L1_error)
20167     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20168     __pyx_t_2 = ((__pyx_t_5 > 0xC8) != 0);
20169     if (__pyx_t_2) {
20170
20171       /* "lxml/objectify.pyx":1281
20172  *         if caching:
20173  *             if len(self._cache) > 200:
20174  *                 self._cache.clear()             # <<<<<<<<<<<<<<
20175  *             self._cache[tag] = element_maker
20176  *         return element_maker
20177  */
20178       if (unlikely(__pyx_v_self->_cache == Py_None)) {
20179         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear");
20180         __PYX_ERR(0, 1281, __pyx_L1_error)
20181       }
20182       __pyx_t_6 = __Pyx_PyDict_Clear(__pyx_v_self->_cache); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1281, __pyx_L1_error)
20183
20184       /* "lxml/objectify.pyx":1280
20185  *         element_maker._element_factory = self._makeelement
20186  *         if caching:
20187  *             if len(self._cache) > 200:             # <<<<<<<<<<<<<<
20188  *                 self._cache.clear()
20189  *             self._cache[tag] = element_maker
20190  */
20191     }
20192
20193     /* "lxml/objectify.pyx":1282
20194  *             if len(self._cache) > 200:
20195  *                 self._cache.clear()
20196  *             self._cache[tag] = element_maker             # <<<<<<<<<<<<<<
20197  *         return element_maker
20198  * 
20199  */
20200     if (unlikely(__pyx_v_self->_cache == Py_None)) {
20201       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
20202       __PYX_ERR(0, 1282, __pyx_L1_error)
20203     }
20204     if (unlikely(PyDict_SetItem(__pyx_v_self->_cache, __pyx_v_tag, ((PyObject *)__pyx_v_element_maker)) < 0)) __PYX_ERR(0, 1282, __pyx_L1_error)
20205
20206     /* "lxml/objectify.pyx":1279
20207  *         element_maker._annotate = self._annotate
20208  *         element_maker._element_factory = self._makeelement
20209  *         if caching:             # <<<<<<<<<<<<<<
20210  *             if len(self._cache) > 200:
20211  *                 self._cache.clear()
20212  */
20213   }
20214
20215   /* "lxml/objectify.pyx":1283
20216  *                 self._cache.clear()
20217  *             self._cache[tag] = element_maker
20218  *         return element_maker             # <<<<<<<<<<<<<<
20219  * 
20220  *     def __getattr__(self, tag):
20221  */
20222   __Pyx_XDECREF(__pyx_r);
20223   __Pyx_INCREF(((PyObject *)__pyx_v_element_maker));
20224   __pyx_r = ((PyObject *)__pyx_v_element_maker);
20225   goto __pyx_L0;
20226
20227   /* "lxml/objectify.pyx":1269
20228  * 
20229  *     @cython.final
20230  *     cdef _build_element_maker(self, tag, bint caching):             # <<<<<<<<<<<<<<
20231  *         cdef _ObjectifyElementMakerCaller element_maker
20232  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20233  */
20234
20235   /* function exit code */
20236   __pyx_L1_error:;
20237   __Pyx_XDECREF(__pyx_t_1);
20238   __Pyx_AddTraceback("lxml.objectify.ElementMaker._build_element_maker", __pyx_clineno, __pyx_lineno, __pyx_filename);
20239   __pyx_r = 0;
20240   __pyx_L0:;
20241   __Pyx_XDECREF((PyObject *)__pyx_v_element_maker);
20242   __Pyx_XGIVEREF(__pyx_r);
20243   __Pyx_RefNannyFinishContext();
20244   return __pyx_r;
20245 }
20246
20247 /* "lxml/objectify.pyx":1285
20248  *         return element_maker
20249  * 
20250  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
20251  *         element_maker = self._cache.get(tag)
20252  *         if element_maker is None:
20253  */
20254
20255 /* Python wrapper */
20256 static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
20257 static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
20258   PyObject *__pyx_r = 0;
20259   __Pyx_RefNannyDeclarations
20260   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
20261   __pyx_r = __pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
20262
20263   /* function exit code */
20264   __Pyx_RefNannyFinishContext();
20265   return __pyx_r;
20266 }
20267
20268 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag) {
20269   PyObject *__pyx_v_element_maker = NULL;
20270   PyObject *__pyx_r = NULL;
20271   __Pyx_RefNannyDeclarations
20272   PyObject *__pyx_t_1 = NULL;
20273   int __pyx_t_2;
20274   int __pyx_t_3;
20275   PyObject *__pyx_t_4 = NULL;
20276   PyObject *__pyx_t_5 = NULL;
20277   int __pyx_t_6;
20278   PyObject *__pyx_t_7 = NULL;
20279   int __pyx_lineno = 0;
20280   const char *__pyx_filename = NULL;
20281   int __pyx_clineno = 0;
20282   __Pyx_RefNannySetupContext("__getattr__", 0);
20283
20284   /* "lxml/objectify.pyx":1286
20285  * 
20286  *     def __getattr__(self, tag):
20287  *         element_maker = self._cache.get(tag)             # <<<<<<<<<<<<<<
20288  *         if element_maker is None:
20289  *             if is_special_method(tag):
20290  */
20291   if (unlikely(__pyx_v_self->_cache == Py_None)) {
20292     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
20293     __PYX_ERR(0, 1286, __pyx_L1_error)
20294   }
20295   __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)
20296   __Pyx_GOTREF(__pyx_t_1);
20297   __pyx_v_element_maker = __pyx_t_1;
20298   __pyx_t_1 = 0;
20299
20300   /* "lxml/objectify.pyx":1287
20301  *     def __getattr__(self, tag):
20302  *         element_maker = self._cache.get(tag)
20303  *         if element_maker is None:             # <<<<<<<<<<<<<<
20304  *             if is_special_method(tag):
20305  *                 return object.__getattr__(self, tag)
20306  */
20307   __pyx_t_2 = (__pyx_v_element_maker == Py_None);
20308   __pyx_t_3 = (__pyx_t_2 != 0);
20309   if (__pyx_t_3) {
20310
20311     /* "lxml/objectify.pyx":1288
20312  *         element_maker = self._cache.get(tag)
20313  *         if element_maker is None:
20314  *             if is_special_method(tag):             # <<<<<<<<<<<<<<
20315  *                 return object.__getattr__(self, tag)
20316  *             return self._build_element_maker(tag, caching=True)
20317  */
20318     __Pyx_INCREF(__pyx_v_4lxml_9objectify_is_special_method);
20319     __pyx_t_4 = __pyx_v_4lxml_9objectify_is_special_method; __pyx_t_5 = NULL;
20320     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
20321       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
20322       if (likely(__pyx_t_5)) {
20323         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20324         __Pyx_INCREF(__pyx_t_5);
20325         __Pyx_INCREF(function);
20326         __Pyx_DECREF_SET(__pyx_t_4, function);
20327       }
20328     }
20329     __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);
20330     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20331     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error)
20332     __Pyx_GOTREF(__pyx_t_1);
20333     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20334     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1288, __pyx_L1_error)
20335     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20336     if (__pyx_t_3) {
20337
20338       /* "lxml/objectify.pyx":1289
20339  *         if element_maker is None:
20340  *             if is_special_method(tag):
20341  *                 return object.__getattr__(self, tag)             # <<<<<<<<<<<<<<
20342  *             return self._build_element_maker(tag, caching=True)
20343  *         return element_maker
20344  */
20345       __Pyx_XDECREF(__pyx_r);
20346       __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)
20347       __Pyx_GOTREF(__pyx_t_4);
20348       __pyx_t_5 = NULL;
20349       __pyx_t_6 = 0;
20350       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
20351         __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
20352         if (likely(__pyx_t_5)) {
20353           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20354           __Pyx_INCREF(__pyx_t_5);
20355           __Pyx_INCREF(function);
20356           __Pyx_DECREF_SET(__pyx_t_4, function);
20357           __pyx_t_6 = 1;
20358         }
20359       }
20360       #if CYTHON_FAST_PYCALL
20361       if (PyFunction_Check(__pyx_t_4)) {
20362         PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_tag};
20363         __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)
20364         __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20365         __Pyx_GOTREF(__pyx_t_1);
20366       } else
20367       #endif
20368       #if CYTHON_FAST_PYCCALL
20369       if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
20370         PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_tag};
20371         __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)
20372         __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20373         __Pyx_GOTREF(__pyx_t_1);
20374       } else
20375       #endif
20376       {
20377         __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1289, __pyx_L1_error)
20378         __Pyx_GOTREF(__pyx_t_7);
20379         if (__pyx_t_5) {
20380           __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
20381         }
20382         __Pyx_INCREF(((PyObject *)__pyx_v_self));
20383         __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
20384         PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self));
20385         __Pyx_INCREF(__pyx_v_tag);
20386         __Pyx_GIVEREF(__pyx_v_tag);
20387         PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_tag);
20388         __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)
20389         __Pyx_GOTREF(__pyx_t_1);
20390         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20391       }
20392       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20393       __pyx_r = __pyx_t_1;
20394       __pyx_t_1 = 0;
20395       goto __pyx_L0;
20396
20397       /* "lxml/objectify.pyx":1288
20398  *         element_maker = self._cache.get(tag)
20399  *         if element_maker is None:
20400  *             if is_special_method(tag):             # <<<<<<<<<<<<<<
20401  *                 return object.__getattr__(self, tag)
20402  *             return self._build_element_maker(tag, caching=True)
20403  */
20404     }
20405
20406     /* "lxml/objectify.pyx":1290
20407  *             if is_special_method(tag):
20408  *                 return object.__getattr__(self, tag)
20409  *             return self._build_element_maker(tag, caching=True)             # <<<<<<<<<<<<<<
20410  *         return element_maker
20411  * 
20412  */
20413     __Pyx_XDECREF(__pyx_r);
20414     __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)
20415     __Pyx_GOTREF(__pyx_t_1);
20416     __pyx_r = __pyx_t_1;
20417     __pyx_t_1 = 0;
20418     goto __pyx_L0;
20419
20420     /* "lxml/objectify.pyx":1287
20421  *     def __getattr__(self, tag):
20422  *         element_maker = self._cache.get(tag)
20423  *         if element_maker is None:             # <<<<<<<<<<<<<<
20424  *             if is_special_method(tag):
20425  *                 return object.__getattr__(self, tag)
20426  */
20427   }
20428
20429   /* "lxml/objectify.pyx":1291
20430  *                 return object.__getattr__(self, tag)
20431  *             return self._build_element_maker(tag, caching=True)
20432  *         return element_maker             # <<<<<<<<<<<<<<
20433  * 
20434  *     def __call__(self, tag, *args, **kwargs):
20435  */
20436   __Pyx_XDECREF(__pyx_r);
20437   __Pyx_INCREF(__pyx_v_element_maker);
20438   __pyx_r = __pyx_v_element_maker;
20439   goto __pyx_L0;
20440
20441   /* "lxml/objectify.pyx":1285
20442  *         return element_maker
20443  * 
20444  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
20445  *         element_maker = self._cache.get(tag)
20446  *         if element_maker is None:
20447  */
20448
20449   /* function exit code */
20450   __pyx_L1_error:;
20451   __Pyx_XDECREF(__pyx_t_1);
20452   __Pyx_XDECREF(__pyx_t_4);
20453   __Pyx_XDECREF(__pyx_t_5);
20454   __Pyx_XDECREF(__pyx_t_7);
20455   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20456   __pyx_r = NULL;
20457   __pyx_L0:;
20458   __Pyx_XDECREF(__pyx_v_element_maker);
20459   __Pyx_XGIVEREF(__pyx_r);
20460   __Pyx_RefNannyFinishContext();
20461   return __pyx_r;
20462 }
20463
20464 /* "lxml/objectify.pyx":1293
20465  *         return element_maker
20466  * 
20467  *     def __call__(self, tag, *args, **kwargs):             # <<<<<<<<<<<<<<
20468  *         element_maker = self._cache.get(tag)
20469  *         if element_maker is None:
20470  */
20471
20472 /* Python wrapper */
20473 static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20474 static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20475   PyObject *__pyx_v_tag = 0;
20476   PyObject *__pyx_v_args = 0;
20477   PyObject *__pyx_v_kwargs = 0;
20478   int __pyx_lineno = 0;
20479   const char *__pyx_filename = NULL;
20480   int __pyx_clineno = 0;
20481   PyObject *__pyx_r = 0;
20482   __Pyx_RefNannyDeclarations
20483   __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
20484   __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
20485   __Pyx_GOTREF(__pyx_v_kwargs);
20486   if (PyTuple_GET_SIZE(__pyx_args) > 1) {
20487     __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
20488     if (unlikely(!__pyx_v_args)) {
20489       __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
20490       __Pyx_RefNannyFinishContext();
20491       return NULL;
20492     }
20493     __Pyx_GOTREF(__pyx_v_args);
20494   } else {
20495     __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
20496   }
20497   {
20498     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag,0};
20499     PyObject* values[1] = {0};
20500     if (unlikely(__pyx_kwds)) {
20501       Py_ssize_t kw_args;
20502       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20503       switch (pos_args) {
20504         default:
20505         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20506         CYTHON_FALLTHROUGH;
20507         case  0: break;
20508       }
20509       kw_args = PyDict_Size(__pyx_kwds);
20510       switch (pos_args) {
20511         case  0:
20512         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
20513         else goto __pyx_L5_argtuple_error;
20514       }
20515       if (unlikely(kw_args > 0)) {
20516         const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
20517         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__call__") < 0)) __PYX_ERR(0, 1293, __pyx_L3_error)
20518       }
20519     } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
20520       goto __pyx_L5_argtuple_error;
20521     } else {
20522       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20523     }
20524     __pyx_v_tag = values[0];
20525   }
20526   goto __pyx_L4_argument_unpacking_done;
20527   __pyx_L5_argtuple_error:;
20528   __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1293, __pyx_L3_error)
20529   __pyx_L3_error:;
20530   __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
20531   __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
20532   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20533   __Pyx_RefNannyFinishContext();
20534   return NULL;
20535   __pyx_L4_argument_unpacking_done:;
20536   __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);
20537
20538   /* function exit code */
20539   __Pyx_XDECREF(__pyx_v_args);
20540   __Pyx_XDECREF(__pyx_v_kwargs);
20541   __Pyx_RefNannyFinishContext();
20542   return __pyx_r;
20543 }
20544
20545 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) {
20546   PyObject *__pyx_v_element_maker = NULL;
20547   PyObject *__pyx_r = NULL;
20548   __Pyx_RefNannyDeclarations
20549   PyObject *__pyx_t_1 = NULL;
20550   int __pyx_t_2;
20551   int __pyx_t_3;
20552   PyObject *__pyx_t_4 = NULL;
20553   PyObject *__pyx_t_5 = NULL;
20554   int __pyx_lineno = 0;
20555   const char *__pyx_filename = NULL;
20556   int __pyx_clineno = 0;
20557   __Pyx_RefNannySetupContext("__call__", 0);
20558
20559   /* "lxml/objectify.pyx":1294
20560  * 
20561  *     def __call__(self, tag, *args, **kwargs):
20562  *         element_maker = self._cache.get(tag)             # <<<<<<<<<<<<<<
20563  *         if element_maker is None:
20564  *             element_maker = self._build_element_maker(
20565  */
20566   if (unlikely(__pyx_v_self->_cache == Py_None)) {
20567     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
20568     __PYX_ERR(0, 1294, __pyx_L1_error)
20569   }
20570   __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)
20571   __Pyx_GOTREF(__pyx_t_1);
20572   __pyx_v_element_maker = __pyx_t_1;
20573   __pyx_t_1 = 0;
20574
20575   /* "lxml/objectify.pyx":1295
20576  *     def __call__(self, tag, *args, **kwargs):
20577  *         element_maker = self._cache.get(tag)
20578  *         if element_maker is None:             # <<<<<<<<<<<<<<
20579  *             element_maker = self._build_element_maker(
20580  *                 tag, caching=not is_special_method(tag))
20581  */
20582   __pyx_t_2 = (__pyx_v_element_maker == Py_None);
20583   __pyx_t_3 = (__pyx_t_2 != 0);
20584   if (__pyx_t_3) {
20585
20586     /* "lxml/objectify.pyx":1297
20587  *         if element_maker is None:
20588  *             element_maker = self._build_element_maker(
20589  *                 tag, caching=not is_special_method(tag))             # <<<<<<<<<<<<<<
20590  *         return element_maker(*args, **kwargs)
20591  * 
20592  */
20593     __Pyx_INCREF(__pyx_v_4lxml_9objectify_is_special_method);
20594     __pyx_t_4 = __pyx_v_4lxml_9objectify_is_special_method; __pyx_t_5 = NULL;
20595     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
20596       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
20597       if (likely(__pyx_t_5)) {
20598         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20599         __Pyx_INCREF(__pyx_t_5);
20600         __Pyx_INCREF(function);
20601         __Pyx_DECREF_SET(__pyx_t_4, function);
20602       }
20603     }
20604     __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);
20605     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20606     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error)
20607     __Pyx_GOTREF(__pyx_t_1);
20608     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20609     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1297, __pyx_L1_error)
20610     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20611
20612     /* "lxml/objectify.pyx":1296
20613  *         element_maker = self._cache.get(tag)
20614  *         if element_maker is None:
20615  *             element_maker = self._build_element_maker(             # <<<<<<<<<<<<<<
20616  *                 tag, caching=not is_special_method(tag))
20617  *         return element_maker(*args, **kwargs)
20618  */
20619     __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)
20620     __Pyx_GOTREF(__pyx_t_1);
20621     __Pyx_DECREF_SET(__pyx_v_element_maker, __pyx_t_1);
20622     __pyx_t_1 = 0;
20623
20624     /* "lxml/objectify.pyx":1295
20625  *     def __call__(self, tag, *args, **kwargs):
20626  *         element_maker = self._cache.get(tag)
20627  *         if element_maker is None:             # <<<<<<<<<<<<<<
20628  *             element_maker = self._build_element_maker(
20629  *                 tag, caching=not is_special_method(tag))
20630  */
20631   }
20632
20633   /* "lxml/objectify.pyx":1298
20634  *             element_maker = self._build_element_maker(
20635  *                 tag, caching=not is_special_method(tag))
20636  *         return element_maker(*args, **kwargs)             # <<<<<<<<<<<<<<
20637  * 
20638  * ################################################################################
20639  */
20640   __Pyx_XDECREF(__pyx_r);
20641   __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)
20642   __Pyx_GOTREF(__pyx_t_1);
20643   __pyx_r = __pyx_t_1;
20644   __pyx_t_1 = 0;
20645   goto __pyx_L0;
20646
20647   /* "lxml/objectify.pyx":1293
20648  *         return element_maker
20649  * 
20650  *     def __call__(self, tag, *args, **kwargs):             # <<<<<<<<<<<<<<
20651  *         element_maker = self._cache.get(tag)
20652  *         if element_maker is None:
20653  */
20654
20655   /* function exit code */
20656   __pyx_L1_error:;
20657   __Pyx_XDECREF(__pyx_t_1);
20658   __Pyx_XDECREF(__pyx_t_4);
20659   __Pyx_XDECREF(__pyx_t_5);
20660   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20661   __pyx_r = NULL;
20662   __pyx_L0:;
20663   __Pyx_XDECREF(__pyx_v_element_maker);
20664   __Pyx_XGIVEREF(__pyx_r);
20665   __Pyx_RefNannyFinishContext();
20666   return __pyx_r;
20667 }
20668
20669 /* "lxml/objectify.pyx":1305
20670  * cdef bint __RECURSIVE_STR = 0 # default: off
20671  * 
20672  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
20673  *     u"""enable_recursive_str(on=True)
20674  * 
20675  */
20676
20677 /* Python wrapper */
20678 static PyObject *__pyx_pw_4lxml_9objectify_13enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20679 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    ";
20680 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};
20681 static PyObject *__pyx_pw_4lxml_9objectify_13enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20682   PyObject *__pyx_v_on = 0;
20683   int __pyx_lineno = 0;
20684   const char *__pyx_filename = NULL;
20685   int __pyx_clineno = 0;
20686   PyObject *__pyx_r = 0;
20687   __Pyx_RefNannyDeclarations
20688   __Pyx_RefNannySetupContext("enable_recursive_str (wrapper)", 0);
20689   {
20690     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_on,0};
20691     PyObject* values[1] = {0};
20692     values[0] = ((PyObject *)((PyObject *)Py_True));
20693     if (unlikely(__pyx_kwds)) {
20694       Py_ssize_t kw_args;
20695       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20696       switch (pos_args) {
20697         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20698         CYTHON_FALLTHROUGH;
20699         case  0: break;
20700         default: goto __pyx_L5_argtuple_error;
20701       }
20702       kw_args = PyDict_Size(__pyx_kwds);
20703       switch (pos_args) {
20704         case  0:
20705         if (kw_args > 0) {
20706           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_on);
20707           if (value) { values[0] = value; kw_args--; }
20708         }
20709       }
20710       if (unlikely(kw_args > 0)) {
20711         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "enable_recursive_str") < 0)) __PYX_ERR(0, 1305, __pyx_L3_error)
20712       }
20713     } else {
20714       switch (PyTuple_GET_SIZE(__pyx_args)) {
20715         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20716         CYTHON_FALLTHROUGH;
20717         case  0: break;
20718         default: goto __pyx_L5_argtuple_error;
20719       }
20720     }
20721     __pyx_v_on = values[0];
20722   }
20723   goto __pyx_L4_argument_unpacking_done;
20724   __pyx_L5_argtuple_error:;
20725   __Pyx_RaiseArgtupleInvalid("enable_recursive_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1305, __pyx_L3_error)
20726   __pyx_L3_error:;
20727   __Pyx_AddTraceback("lxml.objectify.enable_recursive_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
20728   __Pyx_RefNannyFinishContext();
20729   return NULL;
20730   __pyx_L4_argument_unpacking_done:;
20731   __pyx_r = __pyx_pf_4lxml_9objectify_12enable_recursive_str(__pyx_self, __pyx_v_on);
20732
20733   /* function exit code */
20734   __Pyx_RefNannyFinishContext();
20735   return __pyx_r;
20736 }
20737
20738 static PyObject *__pyx_pf_4lxml_9objectify_12enable_recursive_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_on) {
20739   PyObject *__pyx_r = NULL;
20740   __Pyx_RefNannyDeclarations
20741   int __pyx_t_1;
20742   int __pyx_lineno = 0;
20743   const char *__pyx_filename = NULL;
20744   int __pyx_clineno = 0;
20745   __Pyx_RefNannySetupContext("enable_recursive_str", 0);
20746
20747   /* "lxml/objectify.pyx":1312
20748  *     """
20749  *     global __RECURSIVE_STR
20750  *     __RECURSIVE_STR = on             # <<<<<<<<<<<<<<
20751  * 
20752  * def dump(_Element element not None):
20753  */
20754   __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)
20755   __pyx_v_4lxml_9objectify___RECURSIVE_STR = __pyx_t_1;
20756
20757   /* "lxml/objectify.pyx":1305
20758  * cdef bint __RECURSIVE_STR = 0 # default: off
20759  * 
20760  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
20761  *     u"""enable_recursive_str(on=True)
20762  * 
20763  */
20764
20765   /* function exit code */
20766   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20767   goto __pyx_L0;
20768   __pyx_L1_error:;
20769   __Pyx_AddTraceback("lxml.objectify.enable_recursive_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
20770   __pyx_r = NULL;
20771   __pyx_L0:;
20772   __Pyx_XGIVEREF(__pyx_r);
20773   __Pyx_RefNannyFinishContext();
20774   return __pyx_r;
20775 }
20776
20777 /* "lxml/objectify.pyx":1314
20778  *     __RECURSIVE_STR = on
20779  * 
20780  * def dump(_Element element not None):             # <<<<<<<<<<<<<<
20781  *     u"""dump(_Element element not None)
20782  * 
20783  */
20784
20785 /* Python wrapper */
20786 static PyObject *__pyx_pw_4lxml_9objectify_15dump(PyObject *__pyx_self, PyObject *__pyx_v_element); /*proto*/
20787 static char __pyx_doc_4lxml_9objectify_14dump[] = "dump(_Element element not None)\n\n    Return a recursively generated string representation of an element.\n    ";
20788 static PyMethodDef __pyx_mdef_4lxml_9objectify_15dump = {"dump", (PyCFunction)__pyx_pw_4lxml_9objectify_15dump, METH_O, __pyx_doc_4lxml_9objectify_14dump};
20789 static PyObject *__pyx_pw_4lxml_9objectify_15dump(PyObject *__pyx_self, PyObject *__pyx_v_element) {
20790   int __pyx_lineno = 0;
20791   const char *__pyx_filename = NULL;
20792   int __pyx_clineno = 0;
20793   PyObject *__pyx_r = 0;
20794   __Pyx_RefNannyDeclarations
20795   __Pyx_RefNannySetupContext("dump (wrapper)", 0);
20796   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "element", 0))) __PYX_ERR(0, 1314, __pyx_L1_error)
20797   __pyx_r = __pyx_pf_4lxml_9objectify_14dump(__pyx_self, ((struct LxmlElement *)__pyx_v_element));
20798
20799   /* function exit code */
20800   goto __pyx_L0;
20801   __pyx_L1_error:;
20802   __pyx_r = NULL;
20803   __pyx_L0:;
20804   __Pyx_RefNannyFinishContext();
20805   return __pyx_r;
20806 }
20807
20808 static PyObject *__pyx_pf_4lxml_9objectify_14dump(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlElement *__pyx_v_element) {
20809   PyObject *__pyx_r = NULL;
20810   __Pyx_RefNannyDeclarations
20811   PyObject *__pyx_t_1 = NULL;
20812   int __pyx_lineno = 0;
20813   const char *__pyx_filename = NULL;
20814   int __pyx_clineno = 0;
20815   __Pyx_RefNannySetupContext("dump", 0);
20816
20817   /* "lxml/objectify.pyx":1319
20818  *     Return a recursively generated string representation of an element.
20819  *     """
20820  *     return _dump(element, 0)             # <<<<<<<<<<<<<<
20821  * 
20822  * cdef object _dump(_Element element, int indent):
20823  */
20824   __Pyx_XDECREF(__pyx_r);
20825   __pyx_t_1 = __pyx_f_4lxml_9objectify__dump(__pyx_v_element, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __pyx_L1_error)
20826   __Pyx_GOTREF(__pyx_t_1);
20827   __pyx_r = __pyx_t_1;
20828   __pyx_t_1 = 0;
20829   goto __pyx_L0;
20830
20831   /* "lxml/objectify.pyx":1314
20832  *     __RECURSIVE_STR = on
20833  * 
20834  * def dump(_Element element not None):             # <<<<<<<<<<<<<<
20835  *     u"""dump(_Element element not None)
20836  * 
20837  */
20838
20839   /* function exit code */
20840   __pyx_L1_error:;
20841   __Pyx_XDECREF(__pyx_t_1);
20842   __Pyx_AddTraceback("lxml.objectify.dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
20843   __pyx_r = NULL;
20844   __pyx_L0:;
20845   __Pyx_XGIVEREF(__pyx_r);
20846   __Pyx_RefNannyFinishContext();
20847   return __pyx_r;
20848 }
20849
20850 /* "lxml/objectify.pyx":1321
20851  *     return _dump(element, 0)
20852  * 
20853  * cdef object _dump(_Element element, int indent):             # <<<<<<<<<<<<<<
20854  *     indentstr = u"    " * indent
20855  *     if isinstance(element, ObjectifiedDataElement):
20856  */
20857
20858 static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_element, int __pyx_v_indent) {
20859   PyObject *__pyx_v_indentstr = NULL;
20860   PyObject *__pyx_v_value = NULL;
20861   PyObject *__pyx_v_result = NULL;
20862   PyObject *__pyx_v_xsi_ns = NULL;
20863   PyObject *__pyx_v_pytype_ns = NULL;
20864   PyObject *__pyx_v_name = NULL;
20865   PyObject *__pyx_v_child = NULL;
20866   PyObject *__pyx_r = NULL;
20867   __Pyx_RefNannyDeclarations
20868   PyObject *__pyx_t_1 = NULL;
20869   PyObject *__pyx_t_2 = NULL;
20870   int __pyx_t_3;
20871   int __pyx_t_4;
20872   PyObject *__pyx_t_5 = NULL;
20873   Py_ssize_t __pyx_t_6;
20874   Py_UCS4 __pyx_t_7;
20875   int __pyx_t_8;
20876   PyObject *__pyx_t_9 = NULL;
20877   PyObject *__pyx_t_10 = NULL;
20878   PyObject *(*__pyx_t_11)(PyObject *);
20879   int __pyx_t_12;
20880   Py_ssize_t __pyx_t_13;
20881   PyObject *(*__pyx_t_14)(PyObject *);
20882   int __pyx_lineno = 0;
20883   const char *__pyx_filename = NULL;
20884   int __pyx_clineno = 0;
20885   __Pyx_RefNannySetupContext("_dump", 0);
20886
20887   /* "lxml/objectify.pyx":1322
20888  * 
20889  * cdef object _dump(_Element element, int indent):
20890  *     indentstr = u"    " * indent             # <<<<<<<<<<<<<<
20891  *     if isinstance(element, ObjectifiedDataElement):
20892  *         value = repr(element)
20893  */
20894   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_indent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error)
20895   __Pyx_GOTREF(__pyx_t_1);
20896   __pyx_t_2 = PyNumber_Multiply(__pyx_kp_u__10, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error)
20897   __Pyx_GOTREF(__pyx_t_2);
20898   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20899   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)
20900   __pyx_v_indentstr = ((PyObject*)__pyx_t_2);
20901   __pyx_t_2 = 0;
20902
20903   /* "lxml/objectify.pyx":1323
20904  * cdef object _dump(_Element element, int indent):
20905  *     indentstr = u"    " * indent
20906  *     if isinstance(element, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
20907  *         value = repr(element)
20908  *     else:
20909  */
20910   __pyx_t_3 = __Pyx_TypeCheck(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement); 
20911   __pyx_t_4 = (__pyx_t_3 != 0);
20912   if (__pyx_t_4) {
20913
20914     /* "lxml/objectify.pyx":1324
20915  *     indentstr = u"    " * indent
20916  *     if isinstance(element, ObjectifiedDataElement):
20917  *         value = repr(element)             # <<<<<<<<<<<<<<
20918  *     else:
20919  *         value = textOf(element._c_node)
20920  */
20921     __pyx_t_2 = PyObject_Repr(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error)
20922     __Pyx_GOTREF(__pyx_t_2);
20923     __pyx_v_value = __pyx_t_2;
20924     __pyx_t_2 = 0;
20925
20926     /* "lxml/objectify.pyx":1323
20927  * cdef object _dump(_Element element, int indent):
20928  *     indentstr = u"    " * indent
20929  *     if isinstance(element, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
20930  *         value = repr(element)
20931  *     else:
20932  */
20933     goto __pyx_L3;
20934   }
20935
20936   /* "lxml/objectify.pyx":1326
20937  *         value = repr(element)
20938  *     else:
20939  *         value = textOf(element._c_node)             # <<<<<<<<<<<<<<
20940  *         if value is not None:
20941  *             if not value.strip():
20942  */
20943   /*else*/ {
20944     __pyx_t_2 = textOf(__pyx_v_element->_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
20945     __Pyx_GOTREF(__pyx_t_2);
20946     __pyx_v_value = __pyx_t_2;
20947     __pyx_t_2 = 0;
20948
20949     /* "lxml/objectify.pyx":1327
20950  *     else:
20951  *         value = textOf(element._c_node)
20952  *         if value is not None:             # <<<<<<<<<<<<<<
20953  *             if not value.strip():
20954  *                 value = None
20955  */
20956     __pyx_t_4 = (__pyx_v_value != Py_None);
20957     __pyx_t_3 = (__pyx_t_4 != 0);
20958     if (__pyx_t_3) {
20959
20960       /* "lxml/objectify.pyx":1328
20961  *         value = textOf(element._c_node)
20962  *         if value is not None:
20963  *             if not value.strip():             # <<<<<<<<<<<<<<
20964  *                 value = None
20965  *             else:
20966  */
20967       __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)
20968       __Pyx_GOTREF(__pyx_t_1);
20969       __pyx_t_5 = NULL;
20970       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
20971         __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
20972         if (likely(__pyx_t_5)) {
20973           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20974           __Pyx_INCREF(__pyx_t_5);
20975           __Pyx_INCREF(function);
20976           __Pyx_DECREF_SET(__pyx_t_1, function);
20977         }
20978       }
20979       __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
20980       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20981       if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L1_error)
20982       __Pyx_GOTREF(__pyx_t_2);
20983       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20984       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1328, __pyx_L1_error)
20985       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20986       __pyx_t_4 = ((!__pyx_t_3) != 0);
20987       if (__pyx_t_4) {
20988
20989         /* "lxml/objectify.pyx":1329
20990  *         if value is not None:
20991  *             if not value.strip():
20992  *                 value = None             # <<<<<<<<<<<<<<
20993  *             else:
20994  *                 value = repr(value)
20995  */
20996         __Pyx_INCREF(Py_None);
20997         __Pyx_DECREF_SET(__pyx_v_value, Py_None);
20998
20999         /* "lxml/objectify.pyx":1328
21000  *         value = textOf(element._c_node)
21001  *         if value is not None:
21002  *             if not value.strip():             # <<<<<<<<<<<<<<
21003  *                 value = None
21004  *             else:
21005  */
21006         goto __pyx_L5;
21007       }
21008
21009       /* "lxml/objectify.pyx":1331
21010  *                 value = None
21011  *             else:
21012  *                 value = repr(value)             # <<<<<<<<<<<<<<
21013  *     result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n"
21014  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
21015  */
21016       /*else*/ {
21017         __pyx_t_2 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
21018         __Pyx_GOTREF(__pyx_t_2);
21019         __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
21020         __pyx_t_2 = 0;
21021       }
21022       __pyx_L5:;
21023
21024       /* "lxml/objectify.pyx":1327
21025  *     else:
21026  *         value = textOf(element._c_node)
21027  *         if value is not None:             # <<<<<<<<<<<<<<
21028  *             if not value.strip():
21029  *                 value = None
21030  */
21031     }
21032   }
21033   __pyx_L3:;
21034
21035   /* "lxml/objectify.pyx":1332
21036  *             else:
21037  *                 value = repr(value)
21038  *     result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n"             # <<<<<<<<<<<<<<
21039  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
21040  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21041  */
21042   __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1332, __pyx_L1_error)
21043   __Pyx_GOTREF(__pyx_t_2);
21044   __pyx_t_6 = 0;
21045   __pyx_t_7 = 127;
21046   __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_indentstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error)
21047   __Pyx_GOTREF(__pyx_t_1);
21048   __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;
21049   __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
21050   __Pyx_GIVEREF(__pyx_t_1);
21051   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
21052   __pyx_t_1 = 0;
21053   __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)
21054   __Pyx_GOTREF(__pyx_t_1);
21055   __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
21056   __Pyx_GOTREF(__pyx_t_5);
21057   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
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, 1, __pyx_t_5);
21062   __pyx_t_5 = 0;
21063   __Pyx_INCREF(__pyx_kp_u__11);
21064   __pyx_t_6 += 3;
21065   __Pyx_GIVEREF(__pyx_kp_u__11);
21066   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__11);
21067   __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
21068   __Pyx_GOTREF(__pyx_t_5);
21069   __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;
21070   __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
21071   __Pyx_GIVEREF(__pyx_t_5);
21072   PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5);
21073   __pyx_t_5 = 0;
21074   __Pyx_INCREF(__pyx_kp_u__12);
21075   __pyx_t_6 += 2;
21076   __Pyx_GIVEREF(__pyx_kp_u__12);
21077   PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__12);
21078   __pyx_t_5 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
21079   __Pyx_GOTREF(__pyx_t_5);
21080   __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error)
21081   __Pyx_GOTREF(__pyx_t_1);
21082   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21083   __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;
21084   __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
21085   __Pyx_GIVEREF(__pyx_t_1);
21086   PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_1);
21087   __pyx_t_1 = 0;
21088   __Pyx_INCREF(__pyx_kp_u__13);
21089   __pyx_t_6 += 2;
21090   __Pyx_GIVEREF(__pyx_kp_u__13);
21091   PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__13);
21092   __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)
21093   __Pyx_GOTREF(__pyx_t_1);
21094   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21095   __pyx_v_result = __pyx_t_1;
21096   __pyx_t_1 = 0;
21097
21098   /* "lxml/objectify.pyx":1333
21099  *                 value = repr(value)
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  */
21105   __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)
21106   __Pyx_GOTREF(__pyx_t_1);
21107   __pyx_v_xsi_ns = ((PyObject*)__pyx_t_1);
21108   __pyx_t_1 = 0;
21109
21110   /* "lxml/objectify.pyx":1334
21111  *     result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n"
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  */
21117   __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)
21118   __Pyx_GOTREF(__pyx_t_1);
21119   __pyx_v_pytype_ns = ((PyObject*)__pyx_t_1);
21120   __pyx_t_1 = 0;
21121
21122   /* "lxml/objectify.pyx":1335
21123  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
21124  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21125  *     for name, value in sorted(cetree.iterattributes(element, 3)):             # <<<<<<<<<<<<<<
21126  *         if u'{' in name:
21127  *             if name == PYTYPE_ATTRIBUTE:
21128  */
21129   __pyx_t_2 = iterattributes(__pyx_v_element, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
21130   __Pyx_GOTREF(__pyx_t_2);
21131   __pyx_t_5 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1335, __pyx_L1_error)
21132   __Pyx_GOTREF(__pyx_t_5);
21133   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21134   __pyx_t_1 = ((PyObject*)__pyx_t_5);
21135   __pyx_t_5 = 0;
21136   __pyx_t_8 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1335, __pyx_L1_error)
21137   if (unlikely(__pyx_t_1 == Py_None)) {
21138     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
21139     __PYX_ERR(0, 1335, __pyx_L1_error)
21140   }
21141   __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
21142   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21143   for (;;) {
21144     if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
21145     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21146     __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)
21147     #else
21148     __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)
21149     __Pyx_GOTREF(__pyx_t_1);
21150     #endif
21151     if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
21152       PyObject* sequence = __pyx_t_1;
21153       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
21154       if (unlikely(size != 2)) {
21155         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
21156         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
21157         __PYX_ERR(0, 1335, __pyx_L1_error)
21158       }
21159       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21160       if (likely(PyTuple_CheckExact(sequence))) {
21161         __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
21162         __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
21163       } else {
21164         __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
21165         __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
21166       }
21167       __Pyx_INCREF(__pyx_t_2);
21168       __Pyx_INCREF(__pyx_t_9);
21169       #else
21170       __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
21171       __Pyx_GOTREF(__pyx_t_2);
21172       __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1335, __pyx_L1_error)
21173       __Pyx_GOTREF(__pyx_t_9);
21174       #endif
21175       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21176     } else {
21177       Py_ssize_t index = -1;
21178       __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1335, __pyx_L1_error)
21179       __Pyx_GOTREF(__pyx_t_10);
21180       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21181       __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
21182       index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
21183       __Pyx_GOTREF(__pyx_t_2);
21184       index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed;
21185       __Pyx_GOTREF(__pyx_t_9);
21186       if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1335, __pyx_L1_error)
21187       __pyx_t_11 = NULL;
21188       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21189       goto __pyx_L9_unpacking_done;
21190       __pyx_L8_unpacking_failed:;
21191       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21192       __pyx_t_11 = NULL;
21193       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
21194       __PYX_ERR(0, 1335, __pyx_L1_error)
21195       __pyx_L9_unpacking_done:;
21196     }
21197     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
21198     __pyx_t_2 = 0;
21199     __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_9);
21200     __pyx_t_9 = 0;
21201
21202     /* "lxml/objectify.pyx":1336
21203  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21204  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21205  *         if u'{' in name:             # <<<<<<<<<<<<<<
21206  *             if name == PYTYPE_ATTRIBUTE:
21207  *                 if value == TREE_PYTYPE_NAME:
21208  */
21209     __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)
21210     __pyx_t_3 = (__pyx_t_4 != 0);
21211     if (__pyx_t_3) {
21212
21213       /* "lxml/objectify.pyx":1337
21214  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21215  *         if u'{' in name:
21216  *             if name == PYTYPE_ATTRIBUTE:             # <<<<<<<<<<<<<<
21217  *                 if value == TREE_PYTYPE_NAME:
21218  *                     continue
21219  */
21220       __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error)
21221       __Pyx_GOTREF(__pyx_t_1);
21222       __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)
21223       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21224       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1337, __pyx_L1_error)
21225       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21226       if (__pyx_t_3) {
21227
21228         /* "lxml/objectify.pyx":1338
21229  *         if u'{' in name:
21230  *             if name == PYTYPE_ATTRIBUTE:
21231  *                 if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
21232  *                     continue
21233  *                 else:
21234  */
21235         __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)
21236         if (__pyx_t_3) {
21237
21238           /* "lxml/objectify.pyx":1339
21239  *             if name == PYTYPE_ATTRIBUTE:
21240  *                 if value == TREE_PYTYPE_NAME:
21241  *                     continue             # <<<<<<<<<<<<<<
21242  *                 else:
21243  *                     name = name.replace(pytype_ns, u'py:')
21244  */
21245           goto __pyx_L6_continue;
21246
21247           /* "lxml/objectify.pyx":1338
21248  *         if u'{' in name:
21249  *             if name == PYTYPE_ATTRIBUTE:
21250  *                 if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
21251  *                     continue
21252  *                 else:
21253  */
21254         }
21255
21256         /* "lxml/objectify.pyx":1341
21257  *                     continue
21258  *                 else:
21259  *                     name = name.replace(pytype_ns, u'py:')             # <<<<<<<<<<<<<<
21260  *             name = name.replace(xsi_ns, u'xsi:')
21261  *         result += f"{indentstr}  * {name} = {value!r}\n"
21262  */
21263         /*else*/ {
21264           __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)
21265           __Pyx_GOTREF(__pyx_t_1);
21266           __pyx_t_2 = NULL;
21267           __pyx_t_12 = 0;
21268           if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
21269             __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
21270             if (likely(__pyx_t_2)) {
21271               PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
21272               __Pyx_INCREF(__pyx_t_2);
21273               __Pyx_INCREF(function);
21274               __Pyx_DECREF_SET(__pyx_t_1, function);
21275               __pyx_t_12 = 1;
21276             }
21277           }
21278           #if CYTHON_FAST_PYCALL
21279           if (PyFunction_Check(__pyx_t_1)) {
21280             PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_pytype_ns, __pyx_kp_u_py};
21281             __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)
21282             __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21283             __Pyx_GOTREF(__pyx_t_9);
21284           } else
21285           #endif
21286           #if CYTHON_FAST_PYCCALL
21287           if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
21288             PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_pytype_ns, __pyx_kp_u_py};
21289             __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)
21290             __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21291             __Pyx_GOTREF(__pyx_t_9);
21292           } else
21293           #endif
21294           {
21295             __pyx_t_10 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1341, __pyx_L1_error)
21296             __Pyx_GOTREF(__pyx_t_10);
21297             if (__pyx_t_2) {
21298               __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __pyx_t_2 = NULL;
21299             }
21300             __Pyx_INCREF(__pyx_v_pytype_ns);
21301             __Pyx_GIVEREF(__pyx_v_pytype_ns);
21302             PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_pytype_ns);
21303             __Pyx_INCREF(__pyx_kp_u_py);
21304             __Pyx_GIVEREF(__pyx_kp_u_py);
21305             PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_kp_u_py);
21306             __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)
21307             __Pyx_GOTREF(__pyx_t_9);
21308             __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21309           }
21310           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21311           __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_9);
21312           __pyx_t_9 = 0;
21313         }
21314
21315         /* "lxml/objectify.pyx":1337
21316  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21317  *         if u'{' in name:
21318  *             if name == PYTYPE_ATTRIBUTE:             # <<<<<<<<<<<<<<
21319  *                 if value == TREE_PYTYPE_NAME:
21320  *                     continue
21321  */
21322       }
21323
21324       /* "lxml/objectify.pyx":1342
21325  *                 else:
21326  *                     name = name.replace(pytype_ns, u'py:')
21327  *             name = name.replace(xsi_ns, u'xsi:')             # <<<<<<<<<<<<<<
21328  *         result += f"{indentstr}  * {name} = {value!r}\n"
21329  * 
21330  */
21331       __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)
21332       __Pyx_GOTREF(__pyx_t_1);
21333       __pyx_t_10 = NULL;
21334       __pyx_t_12 = 0;
21335       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
21336         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
21337         if (likely(__pyx_t_10)) {
21338           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
21339           __Pyx_INCREF(__pyx_t_10);
21340           __Pyx_INCREF(function);
21341           __Pyx_DECREF_SET(__pyx_t_1, function);
21342           __pyx_t_12 = 1;
21343         }
21344       }
21345       #if CYTHON_FAST_PYCALL
21346       if (PyFunction_Check(__pyx_t_1)) {
21347         PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_xsi_ns, __pyx_kp_u_xsi};
21348         __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)
21349         __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
21350         __Pyx_GOTREF(__pyx_t_9);
21351       } else
21352       #endif
21353       #if CYTHON_FAST_PYCCALL
21354       if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
21355         PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_xsi_ns, __pyx_kp_u_xsi};
21356         __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)
21357         __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
21358         __Pyx_GOTREF(__pyx_t_9);
21359       } else
21360       #endif
21361       {
21362         __pyx_t_2 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error)
21363         __Pyx_GOTREF(__pyx_t_2);
21364         if (__pyx_t_10) {
21365           __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __pyx_t_10 = NULL;
21366         }
21367         __Pyx_INCREF(__pyx_v_xsi_ns);
21368         __Pyx_GIVEREF(__pyx_v_xsi_ns);
21369         PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_12, __pyx_v_xsi_ns);
21370         __Pyx_INCREF(__pyx_kp_u_xsi);
21371         __Pyx_GIVEREF(__pyx_kp_u_xsi);
21372         PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_12, __pyx_kp_u_xsi);
21373         __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)
21374         __Pyx_GOTREF(__pyx_t_9);
21375         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21376       }
21377       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21378       __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_9);
21379       __pyx_t_9 = 0;
21380
21381       /* "lxml/objectify.pyx":1336
21382  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21383  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21384  *         if u'{' in name:             # <<<<<<<<<<<<<<
21385  *             if name == PYTYPE_ATTRIBUTE:
21386  *                 if value == TREE_PYTYPE_NAME:
21387  */
21388     }
21389
21390     /* "lxml/objectify.pyx":1343
21391  *                     name = name.replace(pytype_ns, u'py:')
21392  *             name = name.replace(xsi_ns, u'xsi:')
21393  *         result += f"{indentstr}  * {name} = {value!r}\n"             # <<<<<<<<<<<<<<
21394  * 
21395  *     indent += 1
21396  */
21397     __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1343, __pyx_L1_error)
21398     __Pyx_GOTREF(__pyx_t_9);
21399     __pyx_t_13 = 0;
21400     __pyx_t_7 = 127;
21401     __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_indentstr); 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, 0, __pyx_t_1);
21407     __pyx_t_1 = 0;
21408     __Pyx_INCREF(__pyx_kp_u__14);
21409     __pyx_t_13 += 4;
21410     __Pyx_GIVEREF(__pyx_kp_u__14);
21411     PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_kp_u__14);
21412     __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __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, 2, __pyx_t_1);
21418     __pyx_t_1 = 0;
21419     __Pyx_INCREF(__pyx_kp_u__11);
21420     __pyx_t_13 += 3;
21421     __Pyx_GIVEREF(__pyx_kp_u__11);
21422     PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_kp_u__11);
21423     __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)
21424     __Pyx_GOTREF(__pyx_t_1);
21425     __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;
21426     __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
21427     __Pyx_GIVEREF(__pyx_t_1);
21428     PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_1);
21429     __pyx_t_1 = 0;
21430     __Pyx_INCREF(__pyx_kp_u__15);
21431     __pyx_t_13 += 1;
21432     __Pyx_GIVEREF(__pyx_kp_u__15);
21433     PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_kp_u__15);
21434     __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)
21435     __Pyx_GOTREF(__pyx_t_1);
21436     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21437     __pyx_t_9 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1343, __pyx_L1_error)
21438     __Pyx_GOTREF(__pyx_t_9);
21439     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21440     __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_9);
21441     __pyx_t_9 = 0;
21442
21443     /* "lxml/objectify.pyx":1335
21444  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
21445  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21446  *     for name, value in sorted(cetree.iterattributes(element, 3)):             # <<<<<<<<<<<<<<
21447  *         if u'{' in name:
21448  *             if name == PYTYPE_ATTRIBUTE:
21449  */
21450     __pyx_L6_continue:;
21451   }
21452   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21453
21454   /* "lxml/objectify.pyx":1345
21455  *         result += f"{indentstr}  * {name} = {value!r}\n"
21456  * 
21457  *     indent += 1             # <<<<<<<<<<<<<<
21458  *     for child in element.iterchildren():
21459  *         result += _dump(child, indent)
21460  */
21461   __pyx_v_indent = (__pyx_v_indent + 1);
21462
21463   /* "lxml/objectify.pyx":1346
21464  * 
21465  *     indent += 1
21466  *     for child in element.iterchildren():             # <<<<<<<<<<<<<<
21467  *         result += _dump(child, indent)
21468  *     if indent == 1:
21469  */
21470   __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)
21471   __Pyx_GOTREF(__pyx_t_9);
21472   __pyx_t_1 = NULL;
21473   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
21474     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
21475     if (likely(__pyx_t_1)) {
21476       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
21477       __Pyx_INCREF(__pyx_t_1);
21478       __Pyx_INCREF(function);
21479       __Pyx_DECREF_SET(__pyx_t_9, function);
21480     }
21481   }
21482   __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
21483   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21484   if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error)
21485   __Pyx_GOTREF(__pyx_t_5);
21486   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21487   if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
21488     __pyx_t_9 = __pyx_t_5; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0;
21489     __pyx_t_14 = NULL;
21490   } else {
21491     __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1346, __pyx_L1_error)
21492     __Pyx_GOTREF(__pyx_t_9);
21493     __pyx_t_14 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1346, __pyx_L1_error)
21494   }
21495   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21496   for (;;) {
21497     if (likely(!__pyx_t_14)) {
21498       if (likely(PyList_CheckExact(__pyx_t_9))) {
21499         if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_9)) break;
21500         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21501         __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)
21502         #else
21503         __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)
21504         __Pyx_GOTREF(__pyx_t_5);
21505         #endif
21506       } else {
21507         if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
21508         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21509         __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)
21510         #else
21511         __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)
21512         __Pyx_GOTREF(__pyx_t_5);
21513         #endif
21514       }
21515     } else {
21516       __pyx_t_5 = __pyx_t_14(__pyx_t_9);
21517       if (unlikely(!__pyx_t_5)) {
21518         PyObject* exc_type = PyErr_Occurred();
21519         if (exc_type) {
21520           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
21521           else __PYX_ERR(0, 1346, __pyx_L1_error)
21522         }
21523         break;
21524       }
21525       __Pyx_GOTREF(__pyx_t_5);
21526     }
21527     __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_5);
21528     __pyx_t_5 = 0;
21529
21530     /* "lxml/objectify.pyx":1347
21531  *     indent += 1
21532  *     for child in element.iterchildren():
21533  *         result += _dump(child, indent)             # <<<<<<<<<<<<<<
21534  *     if indent == 1:
21535  *         return result[:-1] # strip last '\n'
21536  */
21537     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)
21538     __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)
21539     __Pyx_GOTREF(__pyx_t_5);
21540     __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error)
21541     __Pyx_GOTREF(__pyx_t_1);
21542     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21543     __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
21544     __pyx_t_1 = 0;
21545
21546     /* "lxml/objectify.pyx":1346
21547  * 
21548  *     indent += 1
21549  *     for child in element.iterchildren():             # <<<<<<<<<<<<<<
21550  *         result += _dump(child, indent)
21551  *     if indent == 1:
21552  */
21553   }
21554   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21555
21556   /* "lxml/objectify.pyx":1348
21557  *     for child in element.iterchildren():
21558  *         result += _dump(child, indent)
21559  *     if indent == 1:             # <<<<<<<<<<<<<<
21560  *         return result[:-1] # strip last '\n'
21561  *     else:
21562  */
21563   __pyx_t_3 = ((__pyx_v_indent == 1) != 0);
21564   if (__pyx_t_3) {
21565
21566     /* "lxml/objectify.pyx":1349
21567  *         result += _dump(child, indent)
21568  *     if indent == 1:
21569  *         return result[:-1] # strip last '\n'             # <<<<<<<<<<<<<<
21570  *     else:
21571  *         return result
21572  */
21573     __Pyx_XDECREF(__pyx_r);
21574     __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)
21575     __Pyx_GOTREF(__pyx_t_9);
21576     __pyx_r = __pyx_t_9;
21577     __pyx_t_9 = 0;
21578     goto __pyx_L0;
21579
21580     /* "lxml/objectify.pyx":1348
21581  *     for child in element.iterchildren():
21582  *         result += _dump(child, indent)
21583  *     if indent == 1:             # <<<<<<<<<<<<<<
21584  *         return result[:-1] # strip last '\n'
21585  *     else:
21586  */
21587   }
21588
21589   /* "lxml/objectify.pyx":1351
21590  *         return result[:-1] # strip last '\n'
21591  *     else:
21592  *         return result             # <<<<<<<<<<<<<<
21593  * 
21594  * 
21595  */
21596   /*else*/ {
21597     __Pyx_XDECREF(__pyx_r);
21598     __Pyx_INCREF(__pyx_v_result);
21599     __pyx_r = __pyx_v_result;
21600     goto __pyx_L0;
21601   }
21602
21603   /* "lxml/objectify.pyx":1321
21604  *     return _dump(element, 0)
21605  * 
21606  * cdef object _dump(_Element element, int indent):             # <<<<<<<<<<<<<<
21607  *     indentstr = u"    " * indent
21608  *     if isinstance(element, ObjectifiedDataElement):
21609  */
21610
21611   /* function exit code */
21612   __pyx_L1_error:;
21613   __Pyx_XDECREF(__pyx_t_1);
21614   __Pyx_XDECREF(__pyx_t_2);
21615   __Pyx_XDECREF(__pyx_t_5);
21616   __Pyx_XDECREF(__pyx_t_9);
21617   __Pyx_XDECREF(__pyx_t_10);
21618   __Pyx_AddTraceback("lxml.objectify._dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
21619   __pyx_r = 0;
21620   __pyx_L0:;
21621   __Pyx_XDECREF(__pyx_v_indentstr);
21622   __Pyx_XDECREF(__pyx_v_value);
21623   __Pyx_XDECREF(__pyx_v_result);
21624   __Pyx_XDECREF(__pyx_v_xsi_ns);
21625   __Pyx_XDECREF(__pyx_v_pytype_ns);
21626   __Pyx_XDECREF(__pyx_v_name);
21627   __Pyx_XDECREF(__pyx_v_child);
21628   __Pyx_XGIVEREF(__pyx_r);
21629   __Pyx_RefNannyFinishContext();
21630   return __pyx_r;
21631 }
21632
21633 /* "lxml/objectify.pyx":1357
21634  * # Pickle support for objectified ElementTree
21635  * 
21636  * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
21637  *     return etree.ElementTree(fromstring(data))
21638  * 
21639  */
21640
21641 /* Python wrapper */
21642 static PyObject *__pyx_pw_4lxml_9objectify_17__unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
21643 static PyMethodDef __pyx_mdef_4lxml_9objectify_17__unpickleElementTree = {"__unpickleElementTree", (PyCFunction)__pyx_pw_4lxml_9objectify_17__unpickleElementTree, METH_O, 0};
21644 static PyObject *__pyx_pw_4lxml_9objectify_17__unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data) {
21645   PyObject *__pyx_r = 0;
21646   __Pyx_RefNannyDeclarations
21647   __Pyx_RefNannySetupContext("__unpickleElementTree (wrapper)", 0);
21648   __pyx_r = __pyx_pf_4lxml_9objectify_16__unpickleElementTree(__pyx_self, ((PyObject *)__pyx_v_data));
21649
21650   /* function exit code */
21651   __Pyx_RefNannyFinishContext();
21652   return __pyx_r;
21653 }
21654
21655 static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
21656   PyObject *__pyx_r = NULL;
21657   __Pyx_RefNannyDeclarations
21658   PyObject *__pyx_t_1 = NULL;
21659   PyObject *__pyx_t_2 = NULL;
21660   PyObject *__pyx_t_3 = NULL;
21661   PyObject *__pyx_t_4 = NULL;
21662   PyObject *__pyx_t_5 = NULL;
21663   int __pyx_lineno = 0;
21664   const char *__pyx_filename = NULL;
21665   int __pyx_clineno = 0;
21666   __Pyx_RefNannySetupContext("__unpickleElementTree", 0);
21667
21668   /* "lxml/objectify.pyx":1358
21669  * 
21670  * def __unpickleElementTree(data):
21671  *     return etree.ElementTree(fromstring(data))             # <<<<<<<<<<<<<<
21672  * 
21673  * cdef _setupPickle(elementTreeReduceFunction):
21674  */
21675   __Pyx_XDECREF(__pyx_r);
21676   __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)
21677   __Pyx_GOTREF(__pyx_t_2);
21678   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1358, __pyx_L1_error)
21679   __Pyx_GOTREF(__pyx_t_4);
21680   __pyx_t_5 = NULL;
21681   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
21682     __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
21683     if (likely(__pyx_t_5)) {
21684       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
21685       __Pyx_INCREF(__pyx_t_5);
21686       __Pyx_INCREF(function);
21687       __Pyx_DECREF_SET(__pyx_t_4, function);
21688     }
21689   }
21690   __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);
21691   __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
21692   if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L1_error)
21693   __Pyx_GOTREF(__pyx_t_3);
21694   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21695   __pyx_t_4 = NULL;
21696   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
21697     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
21698     if (likely(__pyx_t_4)) {
21699       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21700       __Pyx_INCREF(__pyx_t_4);
21701       __Pyx_INCREF(function);
21702       __Pyx_DECREF_SET(__pyx_t_2, function);
21703     }
21704   }
21705   __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);
21706   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21707   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21708   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error)
21709   __Pyx_GOTREF(__pyx_t_1);
21710   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21711   __pyx_r = __pyx_t_1;
21712   __pyx_t_1 = 0;
21713   goto __pyx_L0;
21714
21715   /* "lxml/objectify.pyx":1357
21716  * # Pickle support for objectified ElementTree
21717  * 
21718  * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
21719  *     return etree.ElementTree(fromstring(data))
21720  * 
21721  */
21722
21723   /* function exit code */
21724   __pyx_L1_error:;
21725   __Pyx_XDECREF(__pyx_t_1);
21726   __Pyx_XDECREF(__pyx_t_2);
21727   __Pyx_XDECREF(__pyx_t_3);
21728   __Pyx_XDECREF(__pyx_t_4);
21729   __Pyx_XDECREF(__pyx_t_5);
21730   __Pyx_AddTraceback("lxml.objectify.__unpickleElementTree", __pyx_clineno, __pyx_lineno, __pyx_filename);
21731   __pyx_r = NULL;
21732   __pyx_L0:;
21733   __Pyx_XGIVEREF(__pyx_r);
21734   __Pyx_RefNannyFinishContext();
21735   return __pyx_r;
21736 }
21737
21738 /* "lxml/objectify.pyx":1360
21739  *     return etree.ElementTree(fromstring(data))
21740  * 
21741  * cdef _setupPickle(elementTreeReduceFunction):             # <<<<<<<<<<<<<<
21742  *     if python.IS_PYTHON2:
21743  *         import copy_reg as copyreg
21744  */
21745
21746 static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_elementTreeReduceFunction) {
21747   PyObject *__pyx_v_copyreg = NULL;
21748   PyObject *__pyx_r = NULL;
21749   __Pyx_RefNannyDeclarations
21750   int __pyx_t_1;
21751   PyObject *__pyx_t_2 = NULL;
21752   PyObject *__pyx_t_3 = NULL;
21753   PyObject *__pyx_t_4 = NULL;
21754   PyObject *__pyx_t_5 = NULL;
21755   PyObject *__pyx_t_6 = NULL;
21756   int __pyx_t_7;
21757   PyObject *__pyx_t_8 = NULL;
21758   int __pyx_lineno = 0;
21759   const char *__pyx_filename = NULL;
21760   int __pyx_clineno = 0;
21761   __Pyx_RefNannySetupContext("_setupPickle", 0);
21762
21763   /* "lxml/objectify.pyx":1361
21764  * 
21765  * cdef _setupPickle(elementTreeReduceFunction):
21766  *     if python.IS_PYTHON2:             # <<<<<<<<<<<<<<
21767  *         import copy_reg as copyreg
21768  *     else:
21769  */
21770   __pyx_t_1 = (IS_PYTHON2 != 0);
21771   if (__pyx_t_1) {
21772
21773     /* "lxml/objectify.pyx":1362
21774  * cdef _setupPickle(elementTreeReduceFunction):
21775  *     if python.IS_PYTHON2:
21776  *         import copy_reg as copyreg             # <<<<<<<<<<<<<<
21777  *     else:
21778  *         import copyreg
21779  */
21780     __pyx_t_2 = __Pyx_Import(__pyx_n_s_copy_reg, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error)
21781     __Pyx_GOTREF(__pyx_t_2);
21782     __pyx_v_copyreg = __pyx_t_2;
21783     __pyx_t_2 = 0;
21784
21785     /* "lxml/objectify.pyx":1361
21786  * 
21787  * cdef _setupPickle(elementTreeReduceFunction):
21788  *     if python.IS_PYTHON2:             # <<<<<<<<<<<<<<
21789  *         import copy_reg as copyreg
21790  *     else:
21791  */
21792     goto __pyx_L3;
21793   }
21794
21795   /* "lxml/objectify.pyx":1364
21796  *         import copy_reg as copyreg
21797  *     else:
21798  *         import copyreg             # <<<<<<<<<<<<<<
21799  *     copyreg.pickle(etree._ElementTree,
21800  *                    elementTreeReduceFunction, __unpickleElementTree)
21801  */
21802   /*else*/ {
21803     __pyx_t_2 = __Pyx_Import(__pyx_n_s_copyreg, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
21804     __Pyx_GOTREF(__pyx_t_2);
21805     __pyx_v_copyreg = __pyx_t_2;
21806     __pyx_t_2 = 0;
21807   }
21808   __pyx_L3:;
21809
21810   /* "lxml/objectify.pyx":1365
21811  *     else:
21812  *         import copyreg
21813  *     copyreg.pickle(etree._ElementTree,             # <<<<<<<<<<<<<<
21814  *                    elementTreeReduceFunction, __unpickleElementTree)
21815  * 
21816  */
21817   __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)
21818   __Pyx_GOTREF(__pyx_t_3);
21819   __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)
21820   __Pyx_GOTREF(__pyx_t_4);
21821
21822   /* "lxml/objectify.pyx":1366
21823  *         import copyreg
21824  *     copyreg.pickle(etree._ElementTree,
21825  *                    elementTreeReduceFunction, __unpickleElementTree)             # <<<<<<<<<<<<<<
21826  * 
21827  * def pickleReduceElementTree(obj):
21828  */
21829   __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_unpickleElementTree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1366, __pyx_L1_error)
21830   __Pyx_GOTREF(__pyx_t_5);
21831   __pyx_t_6 = NULL;
21832   __pyx_t_7 = 0;
21833   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
21834     __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
21835     if (likely(__pyx_t_6)) {
21836       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
21837       __Pyx_INCREF(__pyx_t_6);
21838       __Pyx_INCREF(function);
21839       __Pyx_DECREF_SET(__pyx_t_3, function);
21840       __pyx_t_7 = 1;
21841     }
21842   }
21843   #if CYTHON_FAST_PYCALL
21844   if (PyFunction_Check(__pyx_t_3)) {
21845     PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_elementTreeReduceFunction, __pyx_t_5};
21846     __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)
21847     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21848     __Pyx_GOTREF(__pyx_t_2);
21849     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21850     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21851   } else
21852   #endif
21853   #if CYTHON_FAST_PYCCALL
21854   if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
21855     PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_elementTreeReduceFunction, __pyx_t_5};
21856     __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)
21857     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21858     __Pyx_GOTREF(__pyx_t_2);
21859     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21860     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21861   } else
21862   #endif
21863   {
21864     __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1365, __pyx_L1_error)
21865     __Pyx_GOTREF(__pyx_t_8);
21866     if (__pyx_t_6) {
21867       __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
21868     }
21869     __Pyx_GIVEREF(__pyx_t_4);
21870     PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
21871     __Pyx_INCREF(__pyx_v_elementTreeReduceFunction);
21872     __Pyx_GIVEREF(__pyx_v_elementTreeReduceFunction);
21873     PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_elementTreeReduceFunction);
21874     __Pyx_GIVEREF(__pyx_t_5);
21875     PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
21876     __pyx_t_4 = 0;
21877     __pyx_t_5 = 0;
21878     __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)
21879     __Pyx_GOTREF(__pyx_t_2);
21880     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21881   }
21882   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21883   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21884
21885   /* "lxml/objectify.pyx":1360
21886  *     return etree.ElementTree(fromstring(data))
21887  * 
21888  * cdef _setupPickle(elementTreeReduceFunction):             # <<<<<<<<<<<<<<
21889  *     if python.IS_PYTHON2:
21890  *         import copy_reg as copyreg
21891  */
21892
21893   /* function exit code */
21894   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21895   goto __pyx_L0;
21896   __pyx_L1_error:;
21897   __Pyx_XDECREF(__pyx_t_2);
21898   __Pyx_XDECREF(__pyx_t_3);
21899   __Pyx_XDECREF(__pyx_t_4);
21900   __Pyx_XDECREF(__pyx_t_5);
21901   __Pyx_XDECREF(__pyx_t_6);
21902   __Pyx_XDECREF(__pyx_t_8);
21903   __Pyx_AddTraceback("lxml.objectify._setupPickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
21904   __pyx_r = 0;
21905   __pyx_L0:;
21906   __Pyx_XDECREF(__pyx_v_copyreg);
21907   __Pyx_XGIVEREF(__pyx_r);
21908   __Pyx_RefNannyFinishContext();
21909   return __pyx_r;
21910 }
21911
21912 /* "lxml/objectify.pyx":1368
21913  *                    elementTreeReduceFunction, __unpickleElementTree)
21914  * 
21915  * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
21916  *     return __unpickleElementTree, (etree.tostring(obj),)
21917  * 
21918  */
21919
21920 /* Python wrapper */
21921 static PyObject *__pyx_pw_4lxml_9objectify_19pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
21922 static PyMethodDef __pyx_mdef_4lxml_9objectify_19pickleReduceElementTree = {"pickleReduceElementTree", (PyCFunction)__pyx_pw_4lxml_9objectify_19pickleReduceElementTree, METH_O, 0};
21923 static PyObject *__pyx_pw_4lxml_9objectify_19pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
21924   PyObject *__pyx_r = 0;
21925   __Pyx_RefNannyDeclarations
21926   __Pyx_RefNannySetupContext("pickleReduceElementTree (wrapper)", 0);
21927   __pyx_r = __pyx_pf_4lxml_9objectify_18pickleReduceElementTree(__pyx_self, ((PyObject *)__pyx_v_obj));
21928
21929   /* function exit code */
21930   __Pyx_RefNannyFinishContext();
21931   return __pyx_r;
21932 }
21933
21934 static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
21935   PyObject *__pyx_r = NULL;
21936   __Pyx_RefNannyDeclarations
21937   PyObject *__pyx_t_1 = NULL;
21938   PyObject *__pyx_t_2 = NULL;
21939   PyObject *__pyx_t_3 = NULL;
21940   PyObject *__pyx_t_4 = NULL;
21941   int __pyx_lineno = 0;
21942   const char *__pyx_filename = NULL;
21943   int __pyx_clineno = 0;
21944   __Pyx_RefNannySetupContext("pickleReduceElementTree", 0);
21945
21946   /* "lxml/objectify.pyx":1369
21947  * 
21948  * def pickleReduceElementTree(obj):
21949  *     return __unpickleElementTree, (etree.tostring(obj),)             # <<<<<<<<<<<<<<
21950  * 
21951  * _setupPickle(pickleReduceElementTree)
21952  */
21953   __Pyx_XDECREF(__pyx_r);
21954   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unpickleElementTree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error)
21955   __Pyx_GOTREF(__pyx_t_1);
21956   __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)
21957   __Pyx_GOTREF(__pyx_t_3);
21958   __pyx_t_4 = NULL;
21959   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
21960     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
21961     if (likely(__pyx_t_4)) {
21962       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
21963       __Pyx_INCREF(__pyx_t_4);
21964       __Pyx_INCREF(function);
21965       __Pyx_DECREF_SET(__pyx_t_3, function);
21966     }
21967   }
21968   __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);
21969   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21970   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error)
21971   __Pyx_GOTREF(__pyx_t_2);
21972   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21973   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1369, __pyx_L1_error)
21974   __Pyx_GOTREF(__pyx_t_3);
21975   __Pyx_GIVEREF(__pyx_t_2);
21976   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
21977   __pyx_t_2 = 0;
21978   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error)
21979   __Pyx_GOTREF(__pyx_t_2);
21980   __Pyx_GIVEREF(__pyx_t_1);
21981   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
21982   __Pyx_GIVEREF(__pyx_t_3);
21983   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
21984   __pyx_t_1 = 0;
21985   __pyx_t_3 = 0;
21986   __pyx_r = __pyx_t_2;
21987   __pyx_t_2 = 0;
21988   goto __pyx_L0;
21989
21990   /* "lxml/objectify.pyx":1368
21991  *                    elementTreeReduceFunction, __unpickleElementTree)
21992  * 
21993  * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
21994  *     return __unpickleElementTree, (etree.tostring(obj),)
21995  * 
21996  */
21997
21998   /* function exit code */
21999   __pyx_L1_error:;
22000   __Pyx_XDECREF(__pyx_t_1);
22001   __Pyx_XDECREF(__pyx_t_2);
22002   __Pyx_XDECREF(__pyx_t_3);
22003   __Pyx_XDECREF(__pyx_t_4);
22004   __Pyx_AddTraceback("lxml.objectify.pickleReduceElementTree", __pyx_clineno, __pyx_lineno, __pyx_filename);
22005   __pyx_r = NULL;
22006   __pyx_L0:;
22007   __Pyx_XGIVEREF(__pyx_r);
22008   __Pyx_RefNannyFinishContext();
22009   return __pyx_r;
22010 }
22011
22012 /* "lxml/objectify.pyx":1383
22013  *     cdef object empty_data_class
22014  *     cdef object tree_class
22015  *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<<
22016  *         u"""Lookup mechanism for objectify.
22017  * 
22018  */
22019
22020 /* Python wrapper */
22021 static int __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22022 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        ";
22023 #if CYTHON_COMPILING_IN_CPYTHON
22024 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__;
22025 #endif
22026 static int __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22027   PyObject *__pyx_v_tree_class = 0;
22028   PyObject *__pyx_v_empty_data_class = 0;
22029   int __pyx_lineno = 0;
22030   const char *__pyx_filename = NULL;
22031   int __pyx_clineno = 0;
22032   int __pyx_r;
22033   __Pyx_RefNannyDeclarations
22034   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
22035   {
22036     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tree_class,&__pyx_n_s_empty_data_class,0};
22037     PyObject* values[2] = {0,0};
22038     values[0] = ((PyObject *)Py_None);
22039     values[1] = ((PyObject *)Py_None);
22040     if (unlikely(__pyx_kwds)) {
22041       Py_ssize_t kw_args;
22042       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22043       switch (pos_args) {
22044         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22045         CYTHON_FALLTHROUGH;
22046         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22047         CYTHON_FALLTHROUGH;
22048         case  0: break;
22049         default: goto __pyx_L5_argtuple_error;
22050       }
22051       kw_args = PyDict_Size(__pyx_kwds);
22052       switch (pos_args) {
22053         case  0:
22054         if (kw_args > 0) {
22055           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tree_class);
22056           if (value) { values[0] = value; kw_args--; }
22057         }
22058         CYTHON_FALLTHROUGH;
22059         case  1:
22060         if (kw_args > 0) {
22061           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_empty_data_class);
22062           if (value) { values[1] = value; kw_args--; }
22063         }
22064       }
22065       if (unlikely(kw_args > 0)) {
22066         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1383, __pyx_L3_error)
22067       }
22068     } else {
22069       switch (PyTuple_GET_SIZE(__pyx_args)) {
22070         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22071         CYTHON_FALLTHROUGH;
22072         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22073         CYTHON_FALLTHROUGH;
22074         case  0: break;
22075         default: goto __pyx_L5_argtuple_error;
22076       }
22077     }
22078     __pyx_v_tree_class = values[0];
22079     __pyx_v_empty_data_class = values[1];
22080   }
22081   goto __pyx_L4_argument_unpacking_done;
22082   __pyx_L5_argtuple_error:;
22083   __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1383, __pyx_L3_error)
22084   __pyx_L3_error:;
22085   __Pyx_AddTraceback("lxml.objectify.ObjectifyElementClassLookup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22086   __Pyx_RefNannyFinishContext();
22087   return -1;
22088   __pyx_L4_argument_unpacking_done:;
22089   __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);
22090
22091   /* function exit code */
22092   __Pyx_RefNannyFinishContext();
22093   return __pyx_r;
22094 }
22095
22096 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) {
22097   int __pyx_r;
22098   __Pyx_RefNannyDeclarations
22099   int __pyx_t_1;
22100   int __pyx_t_2;
22101   __Pyx_RefNannySetupContext("__init__", 0);
22102   __Pyx_INCREF(__pyx_v_tree_class);
22103   __Pyx_INCREF(__pyx_v_empty_data_class);
22104
22105   /* "lxml/objectify.pyx":1392
22106  *         empty data elements (defaults to StringElement).
22107  *         """
22108  *         self._lookup_function = _lookupElementClass             # <<<<<<<<<<<<<<
22109  *         if tree_class is None:
22110  *             tree_class = ObjectifiedElement
22111  */
22112   __pyx_v_self->__pyx_base._lookup_function = __pyx_f_4lxml_9objectify__lookupElementClass;
22113
22114   /* "lxml/objectify.pyx":1393
22115  *         """
22116  *         self._lookup_function = _lookupElementClass
22117  *         if tree_class is None:             # <<<<<<<<<<<<<<
22118  *             tree_class = ObjectifiedElement
22119  *         self.tree_class = tree_class
22120  */
22121   __pyx_t_1 = (__pyx_v_tree_class == Py_None);
22122   __pyx_t_2 = (__pyx_t_1 != 0);
22123   if (__pyx_t_2) {
22124
22125     /* "lxml/objectify.pyx":1394
22126  *         self._lookup_function = _lookupElementClass
22127  *         if tree_class is None:
22128  *             tree_class = ObjectifiedElement             # <<<<<<<<<<<<<<
22129  *         self.tree_class = tree_class
22130  *         if empty_data_class is None:
22131  */
22132     __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
22133     __Pyx_DECREF_SET(__pyx_v_tree_class, ((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
22134
22135     /* "lxml/objectify.pyx":1393
22136  *         """
22137  *         self._lookup_function = _lookupElementClass
22138  *         if tree_class is None:             # <<<<<<<<<<<<<<
22139  *             tree_class = ObjectifiedElement
22140  *         self.tree_class = tree_class
22141  */
22142   }
22143
22144   /* "lxml/objectify.pyx":1395
22145  *         if tree_class is None:
22146  *             tree_class = ObjectifiedElement
22147  *         self.tree_class = tree_class             # <<<<<<<<<<<<<<
22148  *         if empty_data_class is None:
22149  *             empty_data_class = StringElement
22150  */
22151   __Pyx_INCREF(__pyx_v_tree_class);
22152   __Pyx_GIVEREF(__pyx_v_tree_class);
22153   __Pyx_GOTREF(__pyx_v_self->tree_class);
22154   __Pyx_DECREF(__pyx_v_self->tree_class);
22155   __pyx_v_self->tree_class = __pyx_v_tree_class;
22156
22157   /* "lxml/objectify.pyx":1396
22158  *             tree_class = ObjectifiedElement
22159  *         self.tree_class = tree_class
22160  *         if empty_data_class is None:             # <<<<<<<<<<<<<<
22161  *             empty_data_class = StringElement
22162  *         self.empty_data_class = empty_data_class
22163  */
22164   __pyx_t_2 = (__pyx_v_empty_data_class == Py_None);
22165   __pyx_t_1 = (__pyx_t_2 != 0);
22166   if (__pyx_t_1) {
22167
22168     /* "lxml/objectify.pyx":1397
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     __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
22176     __Pyx_DECREF_SET(__pyx_v_empty_data_class, ((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
22177
22178     /* "lxml/objectify.pyx":1396
22179  *             tree_class = ObjectifiedElement
22180  *         self.tree_class = tree_class
22181  *         if empty_data_class is None:             # <<<<<<<<<<<<<<
22182  *             empty_data_class = StringElement
22183  *         self.empty_data_class = empty_data_class
22184  */
22185   }
22186
22187   /* "lxml/objectify.pyx":1398
22188  *         if empty_data_class is None:
22189  *             empty_data_class = StringElement
22190  *         self.empty_data_class = empty_data_class             # <<<<<<<<<<<<<<
22191  * 
22192  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):
22193  */
22194   __Pyx_INCREF(__pyx_v_empty_data_class);
22195   __Pyx_GIVEREF(__pyx_v_empty_data_class);
22196   __Pyx_GOTREF(__pyx_v_self->empty_data_class);
22197   __Pyx_DECREF(__pyx_v_self->empty_data_class);
22198   __pyx_v_self->empty_data_class = __pyx_v_empty_data_class;
22199
22200   /* "lxml/objectify.pyx":1383
22201  *     cdef object empty_data_class
22202  *     cdef object tree_class
22203  *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<<
22204  *         u"""Lookup mechanism for objectify.
22205  * 
22206  */
22207
22208   /* function exit code */
22209   __pyx_r = 0;
22210   __Pyx_XDECREF(__pyx_v_tree_class);
22211   __Pyx_XDECREF(__pyx_v_empty_data_class);
22212   __Pyx_RefNannyFinishContext();
22213   return __pyx_r;
22214 }
22215
22216 /* "lxml/objectify.pyx":1400
22217  *         self.empty_data_class = empty_data_class
22218  * 
22219  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
22220  *     cdef ObjectifyElementClassLookup lookup
22221  *     lookup = <ObjectifyElementClassLookup>state
22222  */
22223
22224 static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_state, CYTHON_UNUSED struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) {
22225   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_lookup = 0;
22226   PyObject *__pyx_v_value = NULL;
22227   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_py_type = NULL;
22228   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_schema_type = NULL;
22229   CYTHON_UNUSED PyObject *__pyx_v_prefix = NULL;
22230   PyObject *__pyx_v_el_class = NULL;
22231   PyObject *__pyx_r = NULL;
22232   __Pyx_RefNannyDeclarations
22233   PyObject *__pyx_t_1 = NULL;
22234   int __pyx_t_2;
22235   int __pyx_t_3;
22236   PyObject *__pyx_t_4 = NULL;
22237   int __pyx_t_5;
22238   PyObject *__pyx_t_6 = NULL;
22239   PyObject *__pyx_t_7 = NULL;
22240   PyObject *(*__pyx_t_8)(PyObject *);
22241   int __pyx_lineno = 0;
22242   const char *__pyx_filename = NULL;
22243   int __pyx_clineno = 0;
22244   __Pyx_RefNannySetupContext("_lookupElementClass", 0);
22245
22246   /* "lxml/objectify.pyx":1402
22247  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):
22248  *     cdef ObjectifyElementClassLookup lookup
22249  *     lookup = <ObjectifyElementClassLookup>state             # <<<<<<<<<<<<<<
22250  *     # if element has children => no data class
22251  *     if cetree.hasChild(c_node):
22252  */
22253   __pyx_t_1 = __pyx_v_state;
22254   __Pyx_INCREF(__pyx_t_1);
22255   __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_t_1);
22256   __pyx_t_1 = 0;
22257
22258   /* "lxml/objectify.pyx":1404
22259  *     lookup = <ObjectifyElementClassLookup>state
22260  *     # if element has children => no data class
22261  *     if cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
22262  *         return lookup.tree_class
22263  * 
22264  */
22265   __pyx_t_2 = (hasChild(__pyx_v_c_node) != 0);
22266   if (__pyx_t_2) {
22267
22268     /* "lxml/objectify.pyx":1405
22269  *     # if element has children => no data class
22270  *     if cetree.hasChild(c_node):
22271  *         return lookup.tree_class             # <<<<<<<<<<<<<<
22272  * 
22273  *     # if element is defined as xsi:nil, return NoneElement class
22274  */
22275     __Pyx_XDECREF(__pyx_r);
22276     __Pyx_INCREF(__pyx_v_lookup->tree_class);
22277     __pyx_r = __pyx_v_lookup->tree_class;
22278     goto __pyx_L0;
22279
22280     /* "lxml/objectify.pyx":1404
22281  *     lookup = <ObjectifyElementClassLookup>state
22282  *     # if element has children => no data class
22283  *     if cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
22284  *         return lookup.tree_class
22285  * 
22286  */
22287   }
22288
22289   /* "lxml/objectify.pyx":1408
22290  * 
22291  *     # if element is defined as xsi:nil, return NoneElement class
22292  *     if u"true" == cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
22293  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil"):
22294  *         return NoneElement
22295  */
22296   __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)
22297   __Pyx_GOTREF(__pyx_t_1);
22298   __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)
22299   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22300   if (__pyx_t_2) {
22301
22302     /* "lxml/objectify.pyx":1410
22303  *     if u"true" == cetree.attributeValueFromNsName(
22304  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil"):
22305  *         return NoneElement             # <<<<<<<<<<<<<<
22306  * 
22307  *     # check for Python type hint
22308  */
22309     __Pyx_XDECREF(__pyx_r);
22310     __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
22311     __pyx_r = ((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement);
22312     goto __pyx_L0;
22313
22314     /* "lxml/objectify.pyx":1408
22315  * 
22316  *     # if element is defined as xsi:nil, return NoneElement class
22317  *     if u"true" == cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
22318  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil"):
22319  *         return NoneElement
22320  */
22321   }
22322
22323   /* "lxml/objectify.pyx":1413
22324  * 
22325  *     # check for Python type hint
22326  *     value = cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
22327  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22328  *     if value is not None:
22329  */
22330   __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)
22331   __Pyx_GOTREF(__pyx_t_1);
22332   __pyx_v_value = __pyx_t_1;
22333   __pyx_t_1 = 0;
22334
22335   /* "lxml/objectify.pyx":1415
22336  *     value = cetree.attributeValueFromNsName(
22337  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22338  *     if value is not None:             # <<<<<<<<<<<<<<
22339  *         if value == TREE_PYTYPE_NAME:
22340  *             return lookup.tree_class
22341  */
22342   __pyx_t_2 = (__pyx_v_value != Py_None);
22343   __pyx_t_3 = (__pyx_t_2 != 0);
22344   if (__pyx_t_3) {
22345
22346     /* "lxml/objectify.pyx":1416
22347  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22348  *     if value is not None:
22349  *         if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
22350  *             return lookup.tree_class
22351  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22352  */
22353     __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)
22354     if (__pyx_t_3) {
22355
22356       /* "lxml/objectify.pyx":1417
22357  *     if value is not None:
22358  *         if value == TREE_PYTYPE_NAME:
22359  *             return lookup.tree_class             # <<<<<<<<<<<<<<
22360  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22361  *         if py_type is not None:
22362  */
22363       __Pyx_XDECREF(__pyx_r);
22364       __Pyx_INCREF(__pyx_v_lookup->tree_class);
22365       __pyx_r = __pyx_v_lookup->tree_class;
22366       goto __pyx_L0;
22367
22368       /* "lxml/objectify.pyx":1416
22369  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22370  *     if value is not None:
22371  *         if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
22372  *             return lookup.tree_class
22373  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22374  */
22375     }
22376
22377     /* "lxml/objectify.pyx":1418
22378  *         if value == TREE_PYTYPE_NAME:
22379  *             return lookup.tree_class
22380  *         py_type = <PyType>_PYTYPE_DICT.get(value)             # <<<<<<<<<<<<<<
22381  *         if py_type is not None:
22382  *             return py_type._type
22383  */
22384     if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
22385       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
22386       __PYX_ERR(0, 1418, __pyx_L1_error)
22387     }
22388     __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)
22389     __Pyx_GOTREF(__pyx_t_1);
22390     __pyx_t_4 = __pyx_t_1;
22391     __Pyx_INCREF(__pyx_t_4);
22392     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22393     __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
22394     __pyx_t_4 = 0;
22395
22396     /* "lxml/objectify.pyx":1419
22397  *             return lookup.tree_class
22398  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22399  *         if py_type is not None:             # <<<<<<<<<<<<<<
22400  *             return py_type._type
22401  *         # unknown 'pyval' => try to figure it out ourself, just go on
22402  */
22403     __pyx_t_3 = (((PyObject *)__pyx_v_py_type) != Py_None);
22404     __pyx_t_2 = (__pyx_t_3 != 0);
22405     if (__pyx_t_2) {
22406
22407       /* "lxml/objectify.pyx":1420
22408  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22409  *         if py_type is not None:
22410  *             return py_type._type             # <<<<<<<<<<<<<<
22411  *         # unknown 'pyval' => try to figure it out ourself, just go on
22412  * 
22413  */
22414       __Pyx_XDECREF(__pyx_r);
22415       __Pyx_INCREF(__pyx_v_py_type->_type);
22416       __pyx_r = __pyx_v_py_type->_type;
22417       goto __pyx_L0;
22418
22419       /* "lxml/objectify.pyx":1419
22420  *             return lookup.tree_class
22421  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22422  *         if py_type is not None:             # <<<<<<<<<<<<<<
22423  *             return py_type._type
22424  *         # unknown 'pyval' => try to figure it out ourself, just go on
22425  */
22426     }
22427
22428     /* "lxml/objectify.pyx":1415
22429  *     value = cetree.attributeValueFromNsName(
22430  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22431  *     if value is not None:             # <<<<<<<<<<<<<<
22432  *         if value == TREE_PYTYPE_NAME:
22433  *             return lookup.tree_class
22434  */
22435   }
22436
22437   /* "lxml/objectify.pyx":1424
22438  * 
22439  *     # check for XML Schema type hint
22440  *     value = cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
22441  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
22442  * 
22443  */
22444   __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)
22445   __Pyx_GOTREF(__pyx_t_4);
22446   __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
22447   __pyx_t_4 = 0;
22448
22449   /* "lxml/objectify.pyx":1427
22450  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
22451  * 
22452  *     if value is not None:             # <<<<<<<<<<<<<<
22453  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22454  *         if schema_type is None and u':' in value:
22455  */
22456   __pyx_t_2 = (__pyx_v_value != Py_None);
22457   __pyx_t_3 = (__pyx_t_2 != 0);
22458   if (__pyx_t_3) {
22459
22460     /* "lxml/objectify.pyx":1428
22461  * 
22462  *     if value is not None:
22463  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)             # <<<<<<<<<<<<<<
22464  *         if schema_type is None and u':' in value:
22465  *             prefix, value = value.split(u':', 1)
22466  */
22467     if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
22468       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
22469       __PYX_ERR(0, 1428, __pyx_L1_error)
22470     }
22471     __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)
22472     __Pyx_GOTREF(__pyx_t_4);
22473     __pyx_t_1 = __pyx_t_4;
22474     __Pyx_INCREF(__pyx_t_1);
22475     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22476     __pyx_v_schema_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1);
22477     __pyx_t_1 = 0;
22478
22479     /* "lxml/objectify.pyx":1429
22480  *     if value is not None:
22481  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22482  *         if schema_type is None and u':' in value:             # <<<<<<<<<<<<<<
22483  *             prefix, value = value.split(u':', 1)
22484  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22485  */
22486     __pyx_t_2 = (((PyObject *)__pyx_v_schema_type) == Py_None);
22487     __pyx_t_5 = (__pyx_t_2 != 0);
22488     if (__pyx_t_5) {
22489     } else {
22490       __pyx_t_3 = __pyx_t_5;
22491       goto __pyx_L10_bool_binop_done;
22492     }
22493     __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)
22494     __pyx_t_2 = (__pyx_t_5 != 0);
22495     __pyx_t_3 = __pyx_t_2;
22496     __pyx_L10_bool_binop_done:;
22497     if (__pyx_t_3) {
22498
22499       /* "lxml/objectify.pyx":1430
22500  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22501  *         if schema_type is None and u':' in value:
22502  *             prefix, value = value.split(u':', 1)             # <<<<<<<<<<<<<<
22503  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22504  *         if schema_type is not None:
22505  */
22506       __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)
22507       __Pyx_GOTREF(__pyx_t_1);
22508       __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)
22509       __Pyx_GOTREF(__pyx_t_4);
22510       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22511       if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
22512         PyObject* sequence = __pyx_t_4;
22513         Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
22514         if (unlikely(size != 2)) {
22515           if (size > 2) __Pyx_RaiseTooManyValuesError(2);
22516           else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
22517           __PYX_ERR(0, 1430, __pyx_L1_error)
22518         }
22519         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22520         if (likely(PyTuple_CheckExact(sequence))) {
22521           __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
22522           __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
22523         } else {
22524           __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
22525           __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
22526         }
22527         __Pyx_INCREF(__pyx_t_1);
22528         __Pyx_INCREF(__pyx_t_6);
22529         #else
22530         __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L1_error)
22531         __Pyx_GOTREF(__pyx_t_1);
22532         __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1430, __pyx_L1_error)
22533         __Pyx_GOTREF(__pyx_t_6);
22534         #endif
22535         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22536       } else {
22537         Py_ssize_t index = -1;
22538         __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1430, __pyx_L1_error)
22539         __Pyx_GOTREF(__pyx_t_7);
22540         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22541         __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
22542         index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed;
22543         __Pyx_GOTREF(__pyx_t_1);
22544         index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed;
22545         __Pyx_GOTREF(__pyx_t_6);
22546         if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1430, __pyx_L1_error)
22547         __pyx_t_8 = NULL;
22548         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22549         goto __pyx_L13_unpacking_done;
22550         __pyx_L12_unpacking_failed:;
22551         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22552         __pyx_t_8 = NULL;
22553         if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
22554         __PYX_ERR(0, 1430, __pyx_L1_error)
22555         __pyx_L13_unpacking_done:;
22556       }
22557       __pyx_v_prefix = __pyx_t_1;
22558       __pyx_t_1 = 0;
22559       __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_6);
22560       __pyx_t_6 = 0;
22561
22562       /* "lxml/objectify.pyx":1431
22563  *         if schema_type is None and u':' in value:
22564  *             prefix, value = value.split(u':', 1)
22565  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)             # <<<<<<<<<<<<<<
22566  *         if schema_type is not None:
22567  *             return schema_type._type
22568  */
22569       if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
22570         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
22571         __PYX_ERR(0, 1431, __pyx_L1_error)
22572       }
22573       __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)
22574       __Pyx_GOTREF(__pyx_t_4);
22575       __pyx_t_6 = __pyx_t_4;
22576       __Pyx_INCREF(__pyx_t_6);
22577       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22578       __Pyx_DECREF_SET(__pyx_v_schema_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
22579       __pyx_t_6 = 0;
22580
22581       /* "lxml/objectify.pyx":1429
22582  *     if value is not None:
22583  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22584  *         if schema_type is None and u':' in value:             # <<<<<<<<<<<<<<
22585  *             prefix, value = value.split(u':', 1)
22586  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22587  */
22588     }
22589
22590     /* "lxml/objectify.pyx":1432
22591  *             prefix, value = value.split(u':', 1)
22592  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22593  *         if schema_type is not None:             # <<<<<<<<<<<<<<
22594  *             return schema_type._type
22595  * 
22596  */
22597     __pyx_t_3 = (((PyObject *)__pyx_v_schema_type) != Py_None);
22598     __pyx_t_2 = (__pyx_t_3 != 0);
22599     if (__pyx_t_2) {
22600
22601       /* "lxml/objectify.pyx":1433
22602  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22603  *         if schema_type is not None:
22604  *             return schema_type._type             # <<<<<<<<<<<<<<
22605  * 
22606  *     # otherwise determine class based on text content type
22607  */
22608       __Pyx_XDECREF(__pyx_r);
22609       __Pyx_INCREF(__pyx_v_schema_type->_type);
22610       __pyx_r = __pyx_v_schema_type->_type;
22611       goto __pyx_L0;
22612
22613       /* "lxml/objectify.pyx":1432
22614  *             prefix, value = value.split(u':', 1)
22615  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22616  *         if schema_type is not None:             # <<<<<<<<<<<<<<
22617  *             return schema_type._type
22618  * 
22619  */
22620     }
22621
22622     /* "lxml/objectify.pyx":1427
22623  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
22624  * 
22625  *     if value is not None:             # <<<<<<<<<<<<<<
22626  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22627  *         if schema_type is None and u':' in value:
22628  */
22629   }
22630
22631   /* "lxml/objectify.pyx":1436
22632  * 
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   __pyx_t_6 = __pyx_f_4lxml_9objectify__guessElementClass(__pyx_v_c_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error)
22639   __Pyx_GOTREF(__pyx_t_6);
22640   __pyx_v_el_class = __pyx_t_6;
22641   __pyx_t_6 = 0;
22642
22643   /* "lxml/objectify.pyx":1437
22644  *     # otherwise determine class based on text content type
22645  *     el_class = _guessElementClass(c_node)
22646  *     if el_class is not None:             # <<<<<<<<<<<<<<
22647  *         return el_class
22648  * 
22649  */
22650   __pyx_t_2 = (__pyx_v_el_class != Py_None);
22651   __pyx_t_3 = (__pyx_t_2 != 0);
22652   if (__pyx_t_3) {
22653
22654     /* "lxml/objectify.pyx":1438
22655  *     el_class = _guessElementClass(c_node)
22656  *     if el_class is not None:
22657  *         return el_class             # <<<<<<<<<<<<<<
22658  * 
22659  *     # if element is a root node => default to tree node
22660  */
22661     __Pyx_XDECREF(__pyx_r);
22662     __Pyx_INCREF(__pyx_v_el_class);
22663     __pyx_r = __pyx_v_el_class;
22664     goto __pyx_L0;
22665
22666     /* "lxml/objectify.pyx":1437
22667  *     # otherwise determine class based on text content type
22668  *     el_class = _guessElementClass(c_node)
22669  *     if el_class is not None:             # <<<<<<<<<<<<<<
22670  *         return el_class
22671  * 
22672  */
22673   }
22674
22675   /* "lxml/objectify.pyx":1441
22676  * 
22677  *     # if element is a root node => default to tree node
22678  *     if c_node.parent is NULL or not tree._isElement(c_node.parent):             # <<<<<<<<<<<<<<
22679  *         return lookup.tree_class
22680  * 
22681  */
22682   __pyx_t_2 = ((__pyx_v_c_node->parent == NULL) != 0);
22683   if (!__pyx_t_2) {
22684   } else {
22685     __pyx_t_3 = __pyx_t_2;
22686     goto __pyx_L17_bool_binop_done;
22687   }
22688   __pyx_t_2 = ((!(_isElement(__pyx_v_c_node->parent) != 0)) != 0);
22689   __pyx_t_3 = __pyx_t_2;
22690   __pyx_L17_bool_binop_done:;
22691   if (__pyx_t_3) {
22692
22693     /* "lxml/objectify.pyx":1442
22694  *     # if element is a root node => default to tree node
22695  *     if c_node.parent is NULL or not tree._isElement(c_node.parent):
22696  *         return lookup.tree_class             # <<<<<<<<<<<<<<
22697  * 
22698  *     return lookup.empty_data_class
22699  */
22700     __Pyx_XDECREF(__pyx_r);
22701     __Pyx_INCREF(__pyx_v_lookup->tree_class);
22702     __pyx_r = __pyx_v_lookup->tree_class;
22703     goto __pyx_L0;
22704
22705     /* "lxml/objectify.pyx":1441
22706  * 
22707  *     # if element is a root node => default to tree node
22708  *     if c_node.parent is NULL or not tree._isElement(c_node.parent):             # <<<<<<<<<<<<<<
22709  *         return lookup.tree_class
22710  * 
22711  */
22712   }
22713
22714   /* "lxml/objectify.pyx":1444
22715  *         return lookup.tree_class
22716  * 
22717  *     return lookup.empty_data_class             # <<<<<<<<<<<<<<
22718  * 
22719  * 
22720  */
22721   __Pyx_XDECREF(__pyx_r);
22722   __Pyx_INCREF(__pyx_v_lookup->empty_data_class);
22723   __pyx_r = __pyx_v_lookup->empty_data_class;
22724   goto __pyx_L0;
22725
22726   /* "lxml/objectify.pyx":1400
22727  *         self.empty_data_class = empty_data_class
22728  * 
22729  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
22730  *     cdef ObjectifyElementClassLookup lookup
22731  *     lookup = <ObjectifyElementClassLookup>state
22732  */
22733
22734   /* function exit code */
22735   __pyx_L1_error:;
22736   __Pyx_XDECREF(__pyx_t_1);
22737   __Pyx_XDECREF(__pyx_t_4);
22738   __Pyx_XDECREF(__pyx_t_6);
22739   __Pyx_XDECREF(__pyx_t_7);
22740   __Pyx_AddTraceback("lxml.objectify._lookupElementClass", __pyx_clineno, __pyx_lineno, __pyx_filename);
22741   __pyx_r = 0;
22742   __pyx_L0:;
22743   __Pyx_XDECREF((PyObject *)__pyx_v_lookup);
22744   __Pyx_XDECREF(__pyx_v_value);
22745   __Pyx_XDECREF((PyObject *)__pyx_v_py_type);
22746   __Pyx_XDECREF((PyObject *)__pyx_v_schema_type);
22747   __Pyx_XDECREF(__pyx_v_prefix);
22748   __Pyx_XDECREF(__pyx_v_el_class);
22749   __Pyx_XGIVEREF(__pyx_r);
22750   __Pyx_RefNannyFinishContext();
22751   return __pyx_r;
22752 }
22753
22754 /* "lxml/objectify.pyx":1450
22755  * # Type annotations
22756  * 
22757  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):             # <<<<<<<<<<<<<<
22758  *     if pytype is None:
22759  *         return None
22760  */
22761
22762 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) {
22763   PyObject *__pyx_v_value = NULL;
22764   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
22765   __Pyx_RefNannyDeclarations
22766   int __pyx_t_1;
22767   int __pyx_t_2;
22768   PyObject *__pyx_t_3 = NULL;
22769   PyObject *__pyx_t_4 = NULL;
22770   PyObject *__pyx_t_5 = NULL;
22771   PyObject *__pyx_t_6 = NULL;
22772   PyObject *__pyx_t_7 = NULL;
22773   PyObject *__pyx_t_8 = NULL;
22774   int __pyx_t_9;
22775   int __pyx_lineno = 0;
22776   const char *__pyx_filename = NULL;
22777   int __pyx_clineno = 0;
22778   __Pyx_RefNannySetupContext("_check_type", 0);
22779
22780   /* "lxml/objectify.pyx":1451
22781  * 
22782  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
22783  *     if pytype is None:             # <<<<<<<<<<<<<<
22784  *         return None
22785  *     value = textOf(c_node)
22786  */
22787   __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
22788   __pyx_t_2 = (__pyx_t_1 != 0);
22789   if (__pyx_t_2) {
22790
22791     /* "lxml/objectify.pyx":1452
22792  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
22793  *     if pytype is None:
22794  *         return None             # <<<<<<<<<<<<<<
22795  *     value = textOf(c_node)
22796  *     try:
22797  */
22798     __Pyx_XDECREF(((PyObject *)__pyx_r));
22799     __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
22800     goto __pyx_L0;
22801
22802     /* "lxml/objectify.pyx":1451
22803  * 
22804  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
22805  *     if pytype is None:             # <<<<<<<<<<<<<<
22806  *         return None
22807  *     value = textOf(c_node)
22808  */
22809   }
22810
22811   /* "lxml/objectify.pyx":1453
22812  *     if pytype is None:
22813  *         return None
22814  *     value = textOf(c_node)             # <<<<<<<<<<<<<<
22815  *     try:
22816  *         pytype.type_check(value)
22817  */
22818   __pyx_t_3 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error)
22819   __Pyx_GOTREF(__pyx_t_3);
22820   __pyx_v_value = __pyx_t_3;
22821   __pyx_t_3 = 0;
22822
22823   /* "lxml/objectify.pyx":1454
22824  *         return None
22825  *     value = textOf(c_node)
22826  *     try:             # <<<<<<<<<<<<<<
22827  *         pytype.type_check(value)
22828  *         return pytype
22829  */
22830   {
22831     __Pyx_PyThreadState_declare
22832     __Pyx_PyThreadState_assign
22833     __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
22834     __Pyx_XGOTREF(__pyx_t_4);
22835     __Pyx_XGOTREF(__pyx_t_5);
22836     __Pyx_XGOTREF(__pyx_t_6);
22837     /*try:*/ {
22838
22839       /* "lxml/objectify.pyx":1455
22840  *     value = textOf(c_node)
22841  *     try:
22842  *         pytype.type_check(value)             # <<<<<<<<<<<<<<
22843  *         return pytype
22844  *     except IGNORABLE_ERRORS:
22845  */
22846       __Pyx_INCREF(__pyx_v_pytype->type_check);
22847       __pyx_t_7 = __pyx_v_pytype->type_check; __pyx_t_8 = NULL;
22848       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
22849         __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
22850         if (likely(__pyx_t_8)) {
22851           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
22852           __Pyx_INCREF(__pyx_t_8);
22853           __Pyx_INCREF(function);
22854           __Pyx_DECREF_SET(__pyx_t_7, function);
22855         }
22856       }
22857       __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);
22858       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
22859       if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1455, __pyx_L4_error)
22860       __Pyx_GOTREF(__pyx_t_3);
22861       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22862       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22863
22864       /* "lxml/objectify.pyx":1456
22865  *     try:
22866  *         pytype.type_check(value)
22867  *         return pytype             # <<<<<<<<<<<<<<
22868  *     except IGNORABLE_ERRORS:
22869  *         # could not be parsed as the specified type => ignore
22870  */
22871       __Pyx_XDECREF(((PyObject *)__pyx_r));
22872       __Pyx_INCREF(((PyObject *)__pyx_v_pytype));
22873       __pyx_r = __pyx_v_pytype;
22874       goto __pyx_L8_try_return;
22875
22876       /* "lxml/objectify.pyx":1454
22877  *         return None
22878  *     value = textOf(c_node)
22879  *     try:             # <<<<<<<<<<<<<<
22880  *         pytype.type_check(value)
22881  *         return pytype
22882  */
22883     }
22884     __pyx_L4_error:;
22885     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
22886     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
22887     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
22888
22889     /* "lxml/objectify.pyx":1457
22890  *         pytype.type_check(value)
22891  *         return pytype
22892  *     except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
22893  *         # could not be parsed as the specified type => ignore
22894  *         pass
22895  */
22896     __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
22897     if (__pyx_t_9) {
22898       __Pyx_ErrRestore(0,0,0);
22899       goto __pyx_L5_exception_handled;
22900     }
22901     goto __pyx_L6_except_error;
22902     __pyx_L6_except_error:;
22903
22904     /* "lxml/objectify.pyx":1454
22905  *         return None
22906  *     value = textOf(c_node)
22907  *     try:             # <<<<<<<<<<<<<<
22908  *         pytype.type_check(value)
22909  *         return pytype
22910  */
22911     __Pyx_XGIVEREF(__pyx_t_4);
22912     __Pyx_XGIVEREF(__pyx_t_5);
22913     __Pyx_XGIVEREF(__pyx_t_6);
22914     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
22915     goto __pyx_L1_error;
22916     __pyx_L8_try_return:;
22917     __Pyx_XGIVEREF(__pyx_t_4);
22918     __Pyx_XGIVEREF(__pyx_t_5);
22919     __Pyx_XGIVEREF(__pyx_t_6);
22920     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
22921     goto __pyx_L0;
22922     __pyx_L5_exception_handled:;
22923     __Pyx_XGIVEREF(__pyx_t_4);
22924     __Pyx_XGIVEREF(__pyx_t_5);
22925     __Pyx_XGIVEREF(__pyx_t_6);
22926     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
22927   }
22928
22929   /* "lxml/objectify.pyx":1460
22930  *         # could not be parsed as the specified type => ignore
22931  *         pass
22932  *     return None             # <<<<<<<<<<<<<<
22933  * 
22934  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
22935  */
22936   __Pyx_XDECREF(((PyObject *)__pyx_r));
22937   __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
22938   goto __pyx_L0;
22939
22940   /* "lxml/objectify.pyx":1450
22941  * # Type annotations
22942  * 
22943  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):             # <<<<<<<<<<<<<<
22944  *     if pytype is None:
22945  *         return None
22946  */
22947
22948   /* function exit code */
22949   __pyx_L1_error:;
22950   __Pyx_XDECREF(__pyx_t_3);
22951   __Pyx_XDECREF(__pyx_t_7);
22952   __Pyx_XDECREF(__pyx_t_8);
22953   __Pyx_AddTraceback("lxml.objectify._check_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
22954   __pyx_r = 0;
22955   __pyx_L0:;
22956   __Pyx_XDECREF(__pyx_v_value);
22957   __Pyx_XGIVEREF((PyObject *)__pyx_r);
22958   __Pyx_RefNannyFinishContext();
22959   return __pyx_r;
22960 }
22961
22962 /* "lxml/objectify.pyx":1462
22963  *     return None
22964  * 
22965  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
22966  *              empty_pytype=None):
22967  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
22968  */
22969
22970 /* Python wrapper */
22971 static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22972 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    ";
22973 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};
22974 static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22975   PyObject *__pyx_v_element_or_tree = 0;
22976   PyObject *__pyx_v_ignore_old = 0;
22977   PyObject *__pyx_v_ignore_xsi = 0;
22978   PyObject *__pyx_v_empty_pytype = 0;
22979   int __pyx_lineno = 0;
22980   const char *__pyx_filename = NULL;
22981   int __pyx_clineno = 0;
22982   PyObject *__pyx_r = 0;
22983   __Pyx_RefNannyDeclarations
22984   __Pyx_RefNannySetupContext("pyannotate (wrapper)", 0);
22985   {
22986     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};
22987     PyObject* values[4] = {0,0,0,0};
22988     values[1] = ((PyObject *)((PyObject *)Py_False));
22989     values[2] = ((PyObject *)((PyObject *)Py_False));
22990
22991     /* "lxml/objectify.pyx":1463
22992  * 
22993  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
22994  *              empty_pytype=None):             # <<<<<<<<<<<<<<
22995  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
22996  * 
22997  */
22998     values[3] = ((PyObject *)((PyObject *)Py_None));
22999     if (unlikely(__pyx_kwds)) {
23000       Py_ssize_t kw_args;
23001       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23002       switch (pos_args) {
23003         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23004         CYTHON_FALLTHROUGH;
23005         case  0: break;
23006         default: goto __pyx_L5_argtuple_error;
23007       }
23008       kw_args = PyDict_Size(__pyx_kwds);
23009       switch (pos_args) {
23010         case  0:
23011         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element_or_tree)) != 0)) kw_args--;
23012         else goto __pyx_L5_argtuple_error;
23013       }
23014       if (kw_args > 0 && likely(kw_args <= 3)) {
23015         Py_ssize_t index;
23016         for (index = 1; index < 4 && kw_args > 0; index++) {
23017           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
23018           if (value) { values[index] = value; kw_args--; }
23019         }
23020       }
23021       if (unlikely(kw_args > 0)) {
23022         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pyannotate") < 0)) __PYX_ERR(0, 1462, __pyx_L3_error)
23023       }
23024     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
23025       goto __pyx_L5_argtuple_error;
23026     } else {
23027       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23028     }
23029     __pyx_v_element_or_tree = values[0];
23030     __pyx_v_ignore_old = values[1];
23031     __pyx_v_ignore_xsi = values[2];
23032     __pyx_v_empty_pytype = values[3];
23033   }
23034   goto __pyx_L4_argument_unpacking_done;
23035   __pyx_L5_argtuple_error:;
23036   __Pyx_RaiseArgtupleInvalid("pyannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1462, __pyx_L3_error)
23037   __pyx_L3_error:;
23038   __Pyx_AddTraceback("lxml.objectify.pyannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23039   __Pyx_RefNannyFinishContext();
23040   return NULL;
23041   __pyx_L4_argument_unpacking_done:;
23042   __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);
23043
23044   /* "lxml/objectify.pyx":1462
23045  *     return None
23046  * 
23047  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
23048  *              empty_pytype=None):
23049  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
23050  */
23051
23052   /* function exit code */
23053   __Pyx_RefNannyFinishContext();
23054   return __pyx_r;
23055 }
23056
23057 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) {
23058   struct LxmlElement *__pyx_v_element = 0;
23059   PyObject *__pyx_r = NULL;
23060   __Pyx_RefNannyDeclarations
23061   PyObject *__pyx_t_1 = NULL;
23062   int __pyx_t_2;
23063   int __pyx_t_3;
23064   int __pyx_lineno = 0;
23065   const char *__pyx_filename = NULL;
23066   int __pyx_clineno = 0;
23067   __Pyx_RefNannySetupContext("pyannotate", 0);
23068
23069   /* "lxml/objectify.pyx":1482
23070  *     """
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  */
23076   __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
23077   __Pyx_GOTREF(__pyx_t_1);
23078   __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
23079   __pyx_t_1 = 0;
23080
23081   /* "lxml/objectify.pyx":1483
23082  *     cdef _Element  element
23083  *     element = cetree.rootNodeOrRaise(element_or_tree)
23084  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)             # <<<<<<<<<<<<<<
23085  * 
23086  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
23087  */
23088   __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)
23089   __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)
23090   __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)
23091   __Pyx_GOTREF(__pyx_t_1);
23092   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23093
23094   /* "lxml/objectify.pyx":1462
23095  *     return None
23096  * 
23097  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
23098  *              empty_pytype=None):
23099  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
23100  */
23101
23102   /* function exit code */
23103   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23104   goto __pyx_L0;
23105   __pyx_L1_error:;
23106   __Pyx_XDECREF(__pyx_t_1);
23107   __Pyx_AddTraceback("lxml.objectify.pyannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23108   __pyx_r = NULL;
23109   __pyx_L0:;
23110   __Pyx_XDECREF((PyObject *)__pyx_v_element);
23111   __Pyx_XGIVEREF(__pyx_r);
23112   __Pyx_RefNannyFinishContext();
23113   return __pyx_r;
23114 }
23115
23116 /* "lxml/objectify.pyx":1485
23117  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
23118  * 
23119  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
23120  *                 empty_type=None):
23121  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
23122  */
23123
23124 /* Python wrapper */
23125 static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23126 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    ";
23127 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};
23128 static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23129   PyObject *__pyx_v_element_or_tree = 0;
23130   PyObject *__pyx_v_ignore_old = 0;
23131   PyObject *__pyx_v_ignore_pytype = 0;
23132   PyObject *__pyx_v_empty_type = 0;
23133   int __pyx_lineno = 0;
23134   const char *__pyx_filename = NULL;
23135   int __pyx_clineno = 0;
23136   PyObject *__pyx_r = 0;
23137   __Pyx_RefNannyDeclarations
23138   __Pyx_RefNannySetupContext("xsiannotate (wrapper)", 0);
23139   {
23140     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};
23141     PyObject* values[4] = {0,0,0,0};
23142     values[1] = ((PyObject *)((PyObject *)Py_False));
23143     values[2] = ((PyObject *)((PyObject *)Py_False));
23144
23145     /* "lxml/objectify.pyx":1486
23146  * 
23147  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
23148  *                 empty_type=None):             # <<<<<<<<<<<<<<
23149  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
23150  * 
23151  */
23152     values[3] = ((PyObject *)((PyObject *)Py_None));
23153     if (unlikely(__pyx_kwds)) {
23154       Py_ssize_t kw_args;
23155       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23156       switch (pos_args) {
23157         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23158         CYTHON_FALLTHROUGH;
23159         case  0: break;
23160         default: goto __pyx_L5_argtuple_error;
23161       }
23162       kw_args = PyDict_Size(__pyx_kwds);
23163       switch (pos_args) {
23164         case  0:
23165         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element_or_tree)) != 0)) kw_args--;
23166         else goto __pyx_L5_argtuple_error;
23167       }
23168       if (kw_args > 0 && likely(kw_args <= 3)) {
23169         Py_ssize_t index;
23170         for (index = 1; index < 4 && kw_args > 0; index++) {
23171           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
23172           if (value) { values[index] = value; kw_args--; }
23173         }
23174       }
23175       if (unlikely(kw_args > 0)) {
23176         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xsiannotate") < 0)) __PYX_ERR(0, 1485, __pyx_L3_error)
23177       }
23178     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
23179       goto __pyx_L5_argtuple_error;
23180     } else {
23181       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23182     }
23183     __pyx_v_element_or_tree = values[0];
23184     __pyx_v_ignore_old = values[1];
23185     __pyx_v_ignore_pytype = values[2];
23186     __pyx_v_empty_type = values[3];
23187   }
23188   goto __pyx_L4_argument_unpacking_done;
23189   __pyx_L5_argtuple_error:;
23190   __Pyx_RaiseArgtupleInvalid("xsiannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1485, __pyx_L3_error)
23191   __pyx_L3_error:;
23192   __Pyx_AddTraceback("lxml.objectify.xsiannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23193   __Pyx_RefNannyFinishContext();
23194   return NULL;
23195   __pyx_L4_argument_unpacking_done:;
23196   __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);
23197
23198   /* "lxml/objectify.pyx":1485
23199  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
23200  * 
23201  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
23202  *                 empty_type=None):
23203  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
23204  */
23205
23206   /* function exit code */
23207   __Pyx_RefNannyFinishContext();
23208   return __pyx_r;
23209 }
23210
23211 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) {
23212   struct LxmlElement *__pyx_v_element = 0;
23213   PyObject *__pyx_r = NULL;
23214   __Pyx_RefNannyDeclarations
23215   PyObject *__pyx_t_1 = NULL;
23216   int __pyx_t_2;
23217   int __pyx_t_3;
23218   int __pyx_lineno = 0;
23219   const char *__pyx_filename = NULL;
23220   int __pyx_clineno = 0;
23221   __Pyx_RefNannySetupContext("xsiannotate", 0);
23222
23223   /* "lxml/objectify.pyx":1510
23224  *     """
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  */
23230   __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1510, __pyx_L1_error)
23231   __Pyx_GOTREF(__pyx_t_1);
23232   __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
23233   __pyx_t_1 = 0;
23234
23235   /* "lxml/objectify.pyx":1511
23236  *     cdef _Element  element
23237  *     element = cetree.rootNodeOrRaise(element_or_tree)
23238  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)             # <<<<<<<<<<<<<<
23239  * 
23240  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
23241  */
23242   __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)
23243   __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)
23244   __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)
23245   __Pyx_GOTREF(__pyx_t_1);
23246   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23247
23248   /* "lxml/objectify.pyx":1485
23249  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
23250  * 
23251  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
23252  *                 empty_type=None):
23253  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
23254  */
23255
23256   /* function exit code */
23257   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23258   goto __pyx_L0;
23259   __pyx_L1_error:;
23260   __Pyx_XDECREF(__pyx_t_1);
23261   __Pyx_AddTraceback("lxml.objectify.xsiannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23262   __pyx_r = NULL;
23263   __pyx_L0:;
23264   __Pyx_XDECREF((PyObject *)__pyx_v_element);
23265   __Pyx_XGIVEREF(__pyx_r);
23266   __Pyx_RefNannyFinishContext();
23267   return __pyx_r;
23268 }
23269
23270 /* "lxml/objectify.pyx":1513
23271  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
23272  * 
23273  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
23274  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
23275  *              annotate_pytype=1):
23276  */
23277
23278 /* Python wrapper */
23279 static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23280 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    ";
23281 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};
23282 static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23283   PyObject *__pyx_v_element_or_tree = 0;
23284   PyObject *__pyx_v_ignore_old = 0;
23285   PyObject *__pyx_v_ignore_xsi = 0;
23286   PyObject *__pyx_v_empty_pytype = 0;
23287   PyObject *__pyx_v_empty_type = 0;
23288   PyObject *__pyx_v_annotate_xsi = 0;
23289   PyObject *__pyx_v_annotate_pytype = 0;
23290   int __pyx_lineno = 0;
23291   const char *__pyx_filename = NULL;
23292   int __pyx_clineno = 0;
23293   PyObject *__pyx_r = 0;
23294   __Pyx_RefNannyDeclarations
23295   __Pyx_RefNannySetupContext("annotate (wrapper)", 0);
23296   {
23297     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};
23298     PyObject* values[7] = {0,0,0,0,0,0,0};
23299     values[1] = ((PyObject *)((PyObject *)Py_True));
23300     values[2] = ((PyObject *)((PyObject *)Py_False));
23301
23302     /* "lxml/objectify.pyx":1514
23303  * 
23304  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
23305  *              empty_pytype=None, empty_type=None, annotate_xsi=0,             # <<<<<<<<<<<<<<
23306  *              annotate_pytype=1):
23307  *     u"""annotate(element_or_tree, ignore_old=True, ignore_xsi=False, empty_pytype=None, empty_type=None, annotate_xsi=0, annotate_pytype=1)
23308  */
23309     values[3] = ((PyObject *)((PyObject *)Py_None));
23310     values[4] = ((PyObject *)((PyObject *)Py_None));
23311     values[5] = ((PyObject *)((PyObject *)__pyx_int_0));
23312     values[6] = ((PyObject *)((PyObject *)__pyx_int_1));
23313     if (unlikely(__pyx_kwds)) {
23314       Py_ssize_t kw_args;
23315       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23316       switch (pos_args) {
23317         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23318         CYTHON_FALLTHROUGH;
23319         case  0: break;
23320         default: goto __pyx_L5_argtuple_error;
23321       }
23322       kw_args = PyDict_Size(__pyx_kwds);
23323       switch (pos_args) {
23324         case  0:
23325         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element_or_tree)) != 0)) kw_args--;
23326         else goto __pyx_L5_argtuple_error;
23327       }
23328       if (kw_args > 0 && likely(kw_args <= 6)) {
23329         Py_ssize_t index;
23330         for (index = 1; index < 7 && kw_args > 0; index++) {
23331           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
23332           if (value) { values[index] = value; kw_args--; }
23333         }
23334       }
23335       if (unlikely(kw_args > 0)) {
23336         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "annotate") < 0)) __PYX_ERR(0, 1513, __pyx_L3_error)
23337       }
23338     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
23339       goto __pyx_L5_argtuple_error;
23340     } else {
23341       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23342     }
23343     __pyx_v_element_or_tree = values[0];
23344     __pyx_v_ignore_old = values[1];
23345     __pyx_v_ignore_xsi = values[2];
23346     __pyx_v_empty_pytype = values[3];
23347     __pyx_v_empty_type = values[4];
23348     __pyx_v_annotate_xsi = values[5];
23349     __pyx_v_annotate_pytype = values[6];
23350   }
23351   goto __pyx_L4_argument_unpacking_done;
23352   __pyx_L5_argtuple_error:;
23353   __Pyx_RaiseArgtupleInvalid("annotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1513, __pyx_L3_error)
23354   __pyx_L3_error:;
23355   __Pyx_AddTraceback("lxml.objectify.annotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23356   __Pyx_RefNannyFinishContext();
23357   return NULL;
23358   __pyx_L4_argument_unpacking_done:;
23359   __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);
23360
23361   /* "lxml/objectify.pyx":1513
23362  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
23363  * 
23364  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
23365  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
23366  *              annotate_pytype=1):
23367  */
23368
23369   /* function exit code */
23370   __Pyx_RefNannyFinishContext();
23371   return __pyx_r;
23372 }
23373
23374 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) {
23375   struct LxmlElement *__pyx_v_element = 0;
23376   PyObject *__pyx_r = NULL;
23377   __Pyx_RefNannyDeclarations
23378   PyObject *__pyx_t_1 = NULL;
23379   int __pyx_t_2;
23380   int __pyx_t_3;
23381   int __pyx_t_4;
23382   int __pyx_t_5;
23383   int __pyx_lineno = 0;
23384   const char *__pyx_filename = NULL;
23385   int __pyx_clineno = 0;
23386   __Pyx_RefNannySetupContext("annotate", 0);
23387
23388   /* "lxml/objectify.pyx":1547
23389  *     """
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   __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
23396   __Pyx_GOTREF(__pyx_t_1);
23397   __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
23398   __pyx_t_1 = 0;
23399
23400   /* "lxml/objectify.pyx":1548
23401  *     cdef _Element  element
23402  *     element = cetree.rootNodeOrRaise(element_or_tree)
23403  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,             # <<<<<<<<<<<<<<
23404  *               ignore_old, empty_type, empty_pytype)
23405  * 
23406  */
23407   __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)
23408   __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)
23409   __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)
23410
23411   /* "lxml/objectify.pyx":1549
23412  *     element = cetree.rootNodeOrRaise(element_or_tree)
23413  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
23414  *               ignore_old, empty_type, empty_pytype)             # <<<<<<<<<<<<<<
23415  * 
23416  * 
23417  */
23418   __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)
23419
23420   /* "lxml/objectify.pyx":1548
23421  *     cdef _Element  element
23422  *     element = cetree.rootNodeOrRaise(element_or_tree)
23423  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,             # <<<<<<<<<<<<<<
23424  *               ignore_old, empty_type, empty_pytype)
23425  * 
23426  */
23427   __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)
23428   __Pyx_GOTREF(__pyx_t_1);
23429   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23430
23431   /* "lxml/objectify.pyx":1513
23432  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
23433  * 
23434  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
23435  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
23436  *              annotate_pytype=1):
23437  */
23438
23439   /* function exit code */
23440   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23441   goto __pyx_L0;
23442   __pyx_L1_error:;
23443   __Pyx_XDECREF(__pyx_t_1);
23444   __Pyx_AddTraceback("lxml.objectify.annotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23445   __pyx_r = NULL;
23446   __pyx_L0:;
23447   __Pyx_XDECREF((PyObject *)__pyx_v_element);
23448   __Pyx_XGIVEREF(__pyx_r);
23449   __Pyx_RefNannyFinishContext();
23450   return __pyx_r;
23451 }
23452
23453 /* "lxml/objectify.pyx":1552
23454  * 
23455  * 
23456  * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype,             # <<<<<<<<<<<<<<
23457  *                bint ignore_xsi, bint ignore_pytype,
23458  *                empty_type_name, empty_pytype_name):
23459  */
23460
23461 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) {
23462   struct LxmlDocument *__pyx_v_doc = 0;
23463   xmlNode *__pyx_v_c_node;
23464   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_empty_pytype = 0;
23465   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_StrType = 0;
23466   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_NoneType = 0;
23467   PyObject *__pyx_r = NULL;
23468   __Pyx_RefNannyDeclarations
23469   int __pyx_t_1;
23470   int __pyx_t_2;
23471   PyObject *__pyx_t_3 = NULL;
23472   PyObject *__pyx_t_4 = NULL;
23473   xmlNode *__pyx_t_5;
23474   int __pyx_t_6;
23475   int __pyx_lineno = 0;
23476   const char *__pyx_filename = NULL;
23477   int __pyx_clineno = 0;
23478   __Pyx_RefNannySetupContext("_annotate", 0);
23479   __Pyx_INCREF(__pyx_v_empty_type_name);
23480   __Pyx_INCREF(__pyx_v_empty_pytype_name);
23481
23482   /* "lxml/objectify.pyx":1559
23483  *     cdef PyType empty_pytype, StrType, NoneType
23484  * 
23485  *     if not annotate_xsi and not annotate_pytype:             # <<<<<<<<<<<<<<
23486  *         return
23487  * 
23488  */
23489   __pyx_t_2 = ((!(__pyx_v_annotate_xsi != 0)) != 0);
23490   if (__pyx_t_2) {
23491   } else {
23492     __pyx_t_1 = __pyx_t_2;
23493     goto __pyx_L4_bool_binop_done;
23494   }
23495   __pyx_t_2 = ((!(__pyx_v_annotate_pytype != 0)) != 0);
23496   __pyx_t_1 = __pyx_t_2;
23497   __pyx_L4_bool_binop_done:;
23498   if (__pyx_t_1) {
23499
23500     /* "lxml/objectify.pyx":1560
23501  * 
23502  *     if not annotate_xsi and not annotate_pytype:
23503  *         return             # <<<<<<<<<<<<<<
23504  * 
23505  *     if empty_type_name is not None:
23506  */
23507     __Pyx_XDECREF(__pyx_r);
23508     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23509     goto __pyx_L0;
23510
23511     /* "lxml/objectify.pyx":1559
23512  *     cdef PyType empty_pytype, StrType, NoneType
23513  * 
23514  *     if not annotate_xsi and not annotate_pytype:             # <<<<<<<<<<<<<<
23515  *         return
23516  * 
23517  */
23518   }
23519
23520   /* "lxml/objectify.pyx":1562
23521  *         return
23522  * 
23523  *     if empty_type_name is not None:             # <<<<<<<<<<<<<<
23524  *         if isinstance(empty_type_name, bytes):
23525  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23526  */
23527   __pyx_t_1 = (__pyx_v_empty_type_name != Py_None);
23528   __pyx_t_2 = (__pyx_t_1 != 0);
23529   if (__pyx_t_2) {
23530
23531     /* "lxml/objectify.pyx":1563
23532  * 
23533  *     if empty_type_name is not None:
23534  *         if isinstance(empty_type_name, bytes):             # <<<<<<<<<<<<<<
23535  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23536  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23537  */
23538     __pyx_t_2 = PyBytes_Check(__pyx_v_empty_type_name); 
23539     __pyx_t_1 = (__pyx_t_2 != 0);
23540     if (__pyx_t_1) {
23541
23542       /* "lxml/objectify.pyx":1564
23543  *     if empty_type_name is not None:
23544  *         if isinstance(empty_type_name, bytes):
23545  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")             # <<<<<<<<<<<<<<
23546  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23547  *     elif empty_pytype_name is not None:
23548  */
23549       if (unlikely(__pyx_v_empty_type_name == Py_None)) {
23550         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
23551         __PYX_ERR(0, 1564, __pyx_L1_error)
23552       }
23553       __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)
23554       __Pyx_GOTREF(__pyx_t_3);
23555       __Pyx_DECREF_SET(__pyx_v_empty_type_name, __pyx_t_3);
23556       __pyx_t_3 = 0;
23557
23558       /* "lxml/objectify.pyx":1563
23559  * 
23560  *     if empty_type_name is not None:
23561  *         if isinstance(empty_type_name, bytes):             # <<<<<<<<<<<<<<
23562  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23563  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23564  */
23565     }
23566
23567     /* "lxml/objectify.pyx":1565
23568  *         if isinstance(empty_type_name, bytes):
23569  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23570  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)             # <<<<<<<<<<<<<<
23571  *     elif empty_pytype_name is not None:
23572  *         if isinstance(empty_pytype_name, bytes):
23573  */
23574     if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
23575       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23576       __PYX_ERR(0, 1565, __pyx_L1_error)
23577     }
23578     __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)
23579     __Pyx_GOTREF(__pyx_t_3);
23580     __pyx_t_4 = __pyx_t_3;
23581     __Pyx_INCREF(__pyx_t_4);
23582     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23583     __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
23584     __pyx_t_4 = 0;
23585
23586     /* "lxml/objectify.pyx":1562
23587  *         return
23588  * 
23589  *     if empty_type_name is not None:             # <<<<<<<<<<<<<<
23590  *         if isinstance(empty_type_name, bytes):
23591  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23592  */
23593     goto __pyx_L6;
23594   }
23595
23596   /* "lxml/objectify.pyx":1566
23597  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23598  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23599  *     elif empty_pytype_name is not None:             # <<<<<<<<<<<<<<
23600  *         if isinstance(empty_pytype_name, bytes):
23601  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23602  */
23603   __pyx_t_1 = (__pyx_v_empty_pytype_name != Py_None);
23604   __pyx_t_2 = (__pyx_t_1 != 0);
23605   if (__pyx_t_2) {
23606
23607     /* "lxml/objectify.pyx":1567
23608  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23609  *     elif empty_pytype_name is not None:
23610  *         if isinstance(empty_pytype_name, bytes):             # <<<<<<<<<<<<<<
23611  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23612  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)
23613  */
23614     __pyx_t_2 = PyBytes_Check(__pyx_v_empty_pytype_name); 
23615     __pyx_t_1 = (__pyx_t_2 != 0);
23616     if (__pyx_t_1) {
23617
23618       /* "lxml/objectify.pyx":1568
23619  *     elif empty_pytype_name is not None:
23620  *         if isinstance(empty_pytype_name, bytes):
23621  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")             # <<<<<<<<<<<<<<
23622  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)
23623  *     else:
23624  */
23625       if (unlikely(__pyx_v_empty_pytype_name == Py_None)) {
23626         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
23627         __PYX_ERR(0, 1568, __pyx_L1_error)
23628       }
23629       __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)
23630       __Pyx_GOTREF(__pyx_t_4);
23631       __Pyx_DECREF_SET(__pyx_v_empty_pytype_name, __pyx_t_4);
23632       __pyx_t_4 = 0;
23633
23634       /* "lxml/objectify.pyx":1567
23635  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23636  *     elif empty_pytype_name is not None:
23637  *         if isinstance(empty_pytype_name, bytes):             # <<<<<<<<<<<<<<
23638  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23639  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)
23640  */
23641     }
23642
23643     /* "lxml/objectify.pyx":1569
23644  *         if isinstance(empty_pytype_name, bytes):
23645  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23646  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)             # <<<<<<<<<<<<<<
23647  *     else:
23648  *         empty_pytype = None
23649  */
23650     if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
23651       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23652       __PYX_ERR(0, 1569, __pyx_L1_error)
23653     }
23654     __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)
23655     __Pyx_GOTREF(__pyx_t_4);
23656     __pyx_t_3 = __pyx_t_4;
23657     __Pyx_INCREF(__pyx_t_3);
23658     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23659     __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3);
23660     __pyx_t_3 = 0;
23661
23662     /* "lxml/objectify.pyx":1566
23663  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23664  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23665  *     elif empty_pytype_name is not None:             # <<<<<<<<<<<<<<
23666  *         if isinstance(empty_pytype_name, bytes):
23667  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23668  */
23669     goto __pyx_L6;
23670   }
23671
23672   /* "lxml/objectify.pyx":1571
23673  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)
23674  *     else:
23675  *         empty_pytype = None             # <<<<<<<<<<<<<<
23676  * 
23677  *     StrType  = <PyType>_PYTYPE_DICT.get(u'str')
23678  */
23679   /*else*/ {
23680     __Pyx_INCREF(Py_None);
23681     __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
23682   }
23683   __pyx_L6:;
23684
23685   /* "lxml/objectify.pyx":1573
23686  *         empty_pytype = None
23687  * 
23688  *     StrType  = <PyType>_PYTYPE_DICT.get(u'str')             # <<<<<<<<<<<<<<
23689  *     NoneType = <PyType>_PYTYPE_DICT.get(u'NoneType')
23690  * 
23691  */
23692   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
23693     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23694     __PYX_ERR(0, 1573, __pyx_L1_error)
23695   }
23696   __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)
23697   __Pyx_GOTREF(__pyx_t_3);
23698   __pyx_t_4 = __pyx_t_3;
23699   __Pyx_INCREF(__pyx_t_4);
23700   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23701   __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
23702   __pyx_t_4 = 0;
23703
23704   /* "lxml/objectify.pyx":1574
23705  * 
23706  *     StrType  = <PyType>_PYTYPE_DICT.get(u'str')
23707  *     NoneType = <PyType>_PYTYPE_DICT.get(u'NoneType')             # <<<<<<<<<<<<<<
23708  * 
23709  *     doc = element._doc
23710  */
23711   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
23712     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23713     __PYX_ERR(0, 1574, __pyx_L1_error)
23714   }
23715   __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)
23716   __Pyx_GOTREF(__pyx_t_4);
23717   __pyx_t_3 = __pyx_t_4;
23718   __Pyx_INCREF(__pyx_t_3);
23719   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23720   __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3);
23721   __pyx_t_3 = 0;
23722
23723   /* "lxml/objectify.pyx":1576
23724  *     NoneType = <PyType>_PYTYPE_DICT.get(u'NoneType')
23725  * 
23726  *     doc = element._doc             # <<<<<<<<<<<<<<
23727  *     c_node = element._c_node
23728  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23729  */
23730   __pyx_t_3 = ((PyObject *)__pyx_v_element->_doc);
23731   __Pyx_INCREF(__pyx_t_3);
23732   __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3);
23733   __pyx_t_3 = 0;
23734
23735   /* "lxml/objectify.pyx":1577
23736  * 
23737  *     doc = element._doc
23738  *     c_node = element._c_node             # <<<<<<<<<<<<<<
23739  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23740  *     if c_node.type == tree.XML_ELEMENT_NODE:
23741  */
23742   __pyx_t_5 = __pyx_v_element->_c_node;
23743   __pyx_v_c_node = __pyx_t_5;
23744
23745   /* "lxml/objectify.pyx":1578
23746  *     doc = element._doc
23747  *     c_node = element._c_node
23748  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)             # <<<<<<<<<<<<<<
23749  *     if c_node.type == tree.XML_ELEMENT_NODE:
23750  *         _annotate_element(c_node, doc, annotate_xsi, annotate_pytype,
23751  */
23752   BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node, __pyx_v_c_node, 1);
23753
23754   /* "lxml/objectify.pyx":1579
23755  *     c_node = element._c_node
23756  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23757  *     if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
23758  *         _annotate_element(c_node, doc, annotate_xsi, annotate_pytype,
23759  *                           ignore_xsi, ignore_pytype,
23760  */
23761   __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
23762   if (__pyx_t_1) {
23763
23764     /* "lxml/objectify.pyx":1580
23765  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23766  *     if c_node.type == tree.XML_ELEMENT_NODE:
23767  *         _annotate_element(c_node, doc, annotate_xsi, annotate_pytype,             # <<<<<<<<<<<<<<
23768  *                           ignore_xsi, ignore_pytype,
23769  *                           empty_type_name, empty_pytype, StrType, NoneType)
23770  */
23771     __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)
23772
23773     /* "lxml/objectify.pyx":1579
23774  *     c_node = element._c_node
23775  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23776  *     if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
23777  *         _annotate_element(c_node, doc, annotate_xsi, annotate_pytype,
23778  *                           ignore_xsi, ignore_pytype,
23779  */
23780   }
23781
23782   /* "lxml/objectify.pyx":1583
23783  *                           ignore_xsi, ignore_pytype,
23784  *                           empty_type_name, empty_pytype, StrType, NoneType)
23785  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)             # <<<<<<<<<<<<<<
23786  * 
23787  * cdef int _annotate_element(tree.xmlNode* c_node, _Document doc,
23788  */
23789   END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
23790
23791   /* "lxml/objectify.pyx":1552
23792  * 
23793  * 
23794  * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype,             # <<<<<<<<<<<<<<
23795  *                bint ignore_xsi, bint ignore_pytype,
23796  *                empty_type_name, empty_pytype_name):
23797  */
23798
23799   /* function exit code */
23800   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23801   goto __pyx_L0;
23802   __pyx_L1_error:;
23803   __Pyx_XDECREF(__pyx_t_3);
23804   __Pyx_XDECREF(__pyx_t_4);
23805   __Pyx_AddTraceback("lxml.objectify._annotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23806   __pyx_r = 0;
23807   __pyx_L0:;
23808   __Pyx_XDECREF((PyObject *)__pyx_v_doc);
23809   __Pyx_XDECREF((PyObject *)__pyx_v_empty_pytype);
23810   __Pyx_XDECREF((PyObject *)__pyx_v_StrType);
23811   __Pyx_XDECREF((PyObject *)__pyx_v_NoneType);
23812   __Pyx_XDECREF(__pyx_v_empty_type_name);
23813   __Pyx_XDECREF(__pyx_v_empty_pytype_name);
23814   __Pyx_XGIVEREF(__pyx_r);
23815   __Pyx_RefNannyFinishContext();
23816   return __pyx_r;
23817 }
23818
23819 /* "lxml/objectify.pyx":1585
23820  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
23821  * 
23822  * cdef int _annotate_element(tree.xmlNode* c_node, _Document doc,             # <<<<<<<<<<<<<<
23823  *                            bint annotate_xsi, bint annotate_pytype,
23824  *                            bint ignore_xsi, bint ignore_pytype,
23825  */
23826
23827 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) {
23828   xmlNs *__pyx_v_c_ns;
23829   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype = 0;
23830   PyObject *__pyx_v_typename = NULL;
23831   long __pyx_v_istree;
23832   PyObject *__pyx_v_prefix = NULL;
23833   PyObject *__pyx_v_old_pytypename = NULL;
23834   PyObject *__pyx_v_typename_utf8 = NULL;
23835   PyObject *__pyx_v_name = NULL;
23836   PyObject *__pyx_v_pytype_name = NULL;
23837   int __pyx_r;
23838   __Pyx_RefNannyDeclarations
23839   PyObject *__pyx_t_1 = NULL;
23840   int __pyx_t_2;
23841   int __pyx_t_3;
23842   int __pyx_t_4;
23843   PyObject *__pyx_t_5 = NULL;
23844   PyObject *__pyx_t_6 = NULL;
23845   PyObject *__pyx_t_7 = NULL;
23846   PyObject *(*__pyx_t_8)(PyObject *);
23847   int __pyx_lineno = 0;
23848   const char *__pyx_filename = NULL;
23849   int __pyx_clineno = 0;
23850   __Pyx_RefNannySetupContext("_annotate_element", 0);
23851
23852   /* "lxml/objectify.pyx":1591
23853  *                            PyType StrType, PyType NoneType) except -1:
23854  *     cdef tree.xmlNs*   c_ns
23855  *     cdef PyType pytype = None             # <<<<<<<<<<<<<<
23856  *     typename = None
23857  *     istree = 0
23858  */
23859   __Pyx_INCREF(Py_None);
23860   __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
23861
23862   /* "lxml/objectify.pyx":1592
23863  *     cdef tree.xmlNs*   c_ns
23864  *     cdef PyType pytype = None
23865  *     typename = None             # <<<<<<<<<<<<<<
23866  *     istree = 0
23867  * 
23868  */
23869   __Pyx_INCREF(Py_None);
23870   __pyx_v_typename = Py_None;
23871
23872   /* "lxml/objectify.pyx":1593
23873  *     cdef PyType pytype = None
23874  *     typename = None
23875  *     istree = 0             # <<<<<<<<<<<<<<
23876  * 
23877  *     # if element is defined as xsi:nil, represent it as None
23878  */
23879   __pyx_v_istree = 0;
23880
23881   /* "lxml/objectify.pyx":1596
23882  * 
23883  *     # if element is defined as xsi:nil, represent it as None
23884  *     if cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
23885  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil") == "true":
23886  *         pytype = NoneType
23887  */
23888   __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)
23889   __Pyx_GOTREF(__pyx_t_1);
23890   __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)
23891   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23892   if (__pyx_t_2) {
23893
23894     /* "lxml/objectify.pyx":1598
23895  *     if cetree.attributeValueFromNsName(
23896  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil") == "true":
23897  *         pytype = NoneType             # <<<<<<<<<<<<<<
23898  * 
23899  *     if pytype is None and not ignore_xsi:
23900  */
23901     __Pyx_INCREF(((PyObject *)__pyx_v_NoneType));
23902     __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_NoneType);
23903
23904     /* "lxml/objectify.pyx":1596
23905  * 
23906  *     # if element is defined as xsi:nil, represent it as None
23907  *     if cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
23908  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil") == "true":
23909  *         pytype = NoneType
23910  */
23911   }
23912
23913   /* "lxml/objectify.pyx":1600
23914  *         pytype = NoneType
23915  * 
23916  *     if pytype is None and not ignore_xsi:             # <<<<<<<<<<<<<<
23917  *         # check that old xsi type value is valid
23918  *         typename = cetree.attributeValueFromNsName(
23919  */
23920   __pyx_t_3 = (((PyObject *)__pyx_v_pytype) == Py_None);
23921   __pyx_t_4 = (__pyx_t_3 != 0);
23922   if (__pyx_t_4) {
23923   } else {
23924     __pyx_t_2 = __pyx_t_4;
23925     goto __pyx_L5_bool_binop_done;
23926   }
23927   __pyx_t_4 = ((!(__pyx_v_ignore_xsi != 0)) != 0);
23928   __pyx_t_2 = __pyx_t_4;
23929   __pyx_L5_bool_binop_done:;
23930   if (__pyx_t_2) {
23931
23932     /* "lxml/objectify.pyx":1602
23933  *     if pytype is None and not ignore_xsi:
23934  *         # check that old xsi type value is valid
23935  *         typename = cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
23936  *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
23937  *         if typename is not None:
23938  */
23939     __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)
23940     __Pyx_GOTREF(__pyx_t_1);
23941     __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_1);
23942     __pyx_t_1 = 0;
23943
23944     /* "lxml/objectify.pyx":1604
23945  *         typename = cetree.attributeValueFromNsName(
23946  *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
23947  *         if typename is not None:             # <<<<<<<<<<<<<<
23948  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23949  *             if pytype is None and u':' in typename:
23950  */
23951     __pyx_t_2 = (__pyx_v_typename != Py_None);
23952     __pyx_t_4 = (__pyx_t_2 != 0);
23953     if (__pyx_t_4) {
23954
23955       /* "lxml/objectify.pyx":1605
23956  *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
23957  *         if typename is not None:
23958  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)             # <<<<<<<<<<<<<<
23959  *             if pytype is None and u':' in typename:
23960  *                 prefix, typename = typename.split(u':', 1)
23961  */
23962       if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
23963         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23964         __PYX_ERR(0, 1605, __pyx_L1_error)
23965       }
23966       __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)
23967       __Pyx_GOTREF(__pyx_t_1);
23968       __pyx_t_5 = __pyx_t_1;
23969       __Pyx_INCREF(__pyx_t_5);
23970       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23971       __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_5));
23972       __pyx_t_5 = 0;
23973
23974       /* "lxml/objectify.pyx":1606
23975  *         if typename is not None:
23976  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23977  *             if pytype is None and u':' in typename:             # <<<<<<<<<<<<<<
23978  *                 prefix, typename = typename.split(u':', 1)
23979  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23980  */
23981       __pyx_t_2 = (((PyObject *)__pyx_v_pytype) == Py_None);
23982       __pyx_t_3 = (__pyx_t_2 != 0);
23983       if (__pyx_t_3) {
23984       } else {
23985         __pyx_t_4 = __pyx_t_3;
23986         goto __pyx_L9_bool_binop_done;
23987       }
23988       __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)
23989       __pyx_t_2 = (__pyx_t_3 != 0);
23990       __pyx_t_4 = __pyx_t_2;
23991       __pyx_L9_bool_binop_done:;
23992       if (__pyx_t_4) {
23993
23994         /* "lxml/objectify.pyx":1607
23995  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23996  *             if pytype is None and u':' in typename:
23997  *                 prefix, typename = typename.split(u':', 1)             # <<<<<<<<<<<<<<
23998  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23999  *             if pytype is not None and pytype is not StrType:
24000  */
24001         __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)
24002         __Pyx_GOTREF(__pyx_t_5);
24003         __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)
24004         __Pyx_GOTREF(__pyx_t_1);
24005         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24006         if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
24007           PyObject* sequence = __pyx_t_1;
24008           Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
24009           if (unlikely(size != 2)) {
24010             if (size > 2) __Pyx_RaiseTooManyValuesError(2);
24011             else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
24012             __PYX_ERR(0, 1607, __pyx_L1_error)
24013           }
24014           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24015           if (likely(PyTuple_CheckExact(sequence))) {
24016             __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
24017             __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
24018           } else {
24019             __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
24020             __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
24021           }
24022           __Pyx_INCREF(__pyx_t_5);
24023           __Pyx_INCREF(__pyx_t_6);
24024           #else
24025           __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1607, __pyx_L1_error)
24026           __Pyx_GOTREF(__pyx_t_5);
24027           __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1607, __pyx_L1_error)
24028           __Pyx_GOTREF(__pyx_t_6);
24029           #endif
24030           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24031         } else {
24032           Py_ssize_t index = -1;
24033           __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1607, __pyx_L1_error)
24034           __Pyx_GOTREF(__pyx_t_7);
24035           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24036           __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
24037           index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed;
24038           __Pyx_GOTREF(__pyx_t_5);
24039           index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed;
24040           __Pyx_GOTREF(__pyx_t_6);
24041           if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1607, __pyx_L1_error)
24042           __pyx_t_8 = NULL;
24043           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24044           goto __pyx_L12_unpacking_done;
24045           __pyx_L11_unpacking_failed:;
24046           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24047           __pyx_t_8 = NULL;
24048           if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
24049           __PYX_ERR(0, 1607, __pyx_L1_error)
24050           __pyx_L12_unpacking_done:;
24051         }
24052         __pyx_v_prefix = __pyx_t_5;
24053         __pyx_t_5 = 0;
24054         __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_6);
24055         __pyx_t_6 = 0;
24056
24057         /* "lxml/objectify.pyx":1608
24058  *             if pytype is None and u':' in typename:
24059  *                 prefix, typename = typename.split(u':', 1)
24060  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)             # <<<<<<<<<<<<<<
24061  *             if pytype is not None and pytype is not StrType:
24062  *                 # StrType does not have a typecheck but is the default
24063  */
24064         if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
24065           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
24066           __PYX_ERR(0, 1608, __pyx_L1_error)
24067         }
24068         __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)
24069         __Pyx_GOTREF(__pyx_t_1);
24070         __pyx_t_6 = __pyx_t_1;
24071         __Pyx_INCREF(__pyx_t_6);
24072         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24073         __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
24074         __pyx_t_6 = 0;
24075
24076         /* "lxml/objectify.pyx":1606
24077  *         if typename is not None:
24078  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24079  *             if pytype is None and u':' in typename:             # <<<<<<<<<<<<<<
24080  *                 prefix, typename = typename.split(u':', 1)
24081  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24082  */
24083       }
24084
24085       /* "lxml/objectify.pyx":1609
24086  *                 prefix, typename = typename.split(u':', 1)
24087  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24088  *             if pytype is not None and pytype is not StrType:             # <<<<<<<<<<<<<<
24089  *                 # StrType does not have a typecheck but is the default
24090  *                 # anyway, so just accept it if given as type
24091  */
24092       __pyx_t_2 = (((PyObject *)__pyx_v_pytype) != Py_None);
24093       __pyx_t_3 = (__pyx_t_2 != 0);
24094       if (__pyx_t_3) {
24095       } else {
24096         __pyx_t_4 = __pyx_t_3;
24097         goto __pyx_L14_bool_binop_done;
24098       }
24099       __pyx_t_3 = (__pyx_v_pytype != __pyx_v_StrType);
24100       __pyx_t_2 = (__pyx_t_3 != 0);
24101       __pyx_t_4 = __pyx_t_2;
24102       __pyx_L14_bool_binop_done:;
24103       if (__pyx_t_4) {
24104
24105         /* "lxml/objectify.pyx":1613
24106  *                 # anyway, so just accept it if given as type
24107  *                 # information
24108  *                 pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
24109  *                 if pytype is None:
24110  *                     typename = None
24111  */
24112         __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)
24113         __Pyx_GOTREF(__pyx_t_6);
24114         __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
24115         __pyx_t_6 = 0;
24116
24117         /* "lxml/objectify.pyx":1614
24118  *                 # information
24119  *                 pytype = _check_type(c_node, pytype)
24120  *                 if pytype is None:             # <<<<<<<<<<<<<<
24121  *                     typename = None
24122  * 
24123  */
24124         __pyx_t_4 = (((PyObject *)__pyx_v_pytype) == Py_None);
24125         __pyx_t_2 = (__pyx_t_4 != 0);
24126         if (__pyx_t_2) {
24127
24128           /* "lxml/objectify.pyx":1615
24129  *                 pytype = _check_type(c_node, pytype)
24130  *                 if pytype is None:
24131  *                     typename = None             # <<<<<<<<<<<<<<
24132  * 
24133  *     if pytype is None and not ignore_pytype:
24134  */
24135           __Pyx_INCREF(Py_None);
24136           __Pyx_DECREF_SET(__pyx_v_typename, Py_None);
24137
24138           /* "lxml/objectify.pyx":1614
24139  *                 # information
24140  *                 pytype = _check_type(c_node, pytype)
24141  *                 if pytype is None:             # <<<<<<<<<<<<<<
24142  *                     typename = None
24143  * 
24144  */
24145         }
24146
24147         /* "lxml/objectify.pyx":1609
24148  *                 prefix, typename = typename.split(u':', 1)
24149  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24150  *             if pytype is not None and pytype is not StrType:             # <<<<<<<<<<<<<<
24151  *                 # StrType does not have a typecheck but is the default
24152  *                 # anyway, so just accept it if given as type
24153  */
24154       }
24155
24156       /* "lxml/objectify.pyx":1604
24157  *         typename = cetree.attributeValueFromNsName(
24158  *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
24159  *         if typename is not None:             # <<<<<<<<<<<<<<
24160  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24161  *             if pytype is None and u':' in typename:
24162  */
24163     }
24164
24165     /* "lxml/objectify.pyx":1600
24166  *         pytype = NoneType
24167  * 
24168  *     if pytype is None and not ignore_xsi:             # <<<<<<<<<<<<<<
24169  *         # check that old xsi type value is valid
24170  *         typename = cetree.attributeValueFromNsName(
24171  */
24172   }
24173
24174   /* "lxml/objectify.pyx":1617
24175  *                     typename = None
24176  * 
24177  *     if pytype is None and not ignore_pytype:             # <<<<<<<<<<<<<<
24178  *         # check that old pytype value is valid
24179  *         old_pytypename = cetree.attributeValueFromNsName(
24180  */
24181   __pyx_t_4 = (((PyObject *)__pyx_v_pytype) == Py_None);
24182   __pyx_t_3 = (__pyx_t_4 != 0);
24183   if (__pyx_t_3) {
24184   } else {
24185     __pyx_t_2 = __pyx_t_3;
24186     goto __pyx_L18_bool_binop_done;
24187   }
24188   __pyx_t_3 = ((!(__pyx_v_ignore_pytype != 0)) != 0);
24189   __pyx_t_2 = __pyx_t_3;
24190   __pyx_L18_bool_binop_done:;
24191   if (__pyx_t_2) {
24192
24193     /* "lxml/objectify.pyx":1619
24194  *     if pytype is None and not ignore_pytype:
24195  *         # check that old pytype value is valid
24196  *         old_pytypename = cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
24197  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24198  *         if old_pytypename is not None:
24199  */
24200     __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)
24201     __Pyx_GOTREF(__pyx_t_6);
24202     __pyx_v_old_pytypename = __pyx_t_6;
24203     __pyx_t_6 = 0;
24204
24205     /* "lxml/objectify.pyx":1621
24206  *         old_pytypename = cetree.attributeValueFromNsName(
24207  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24208  *         if old_pytypename is not None:             # <<<<<<<<<<<<<<
24209  *             if old_pytypename == TREE_PYTYPE_NAME:
24210  *                 if not cetree.hasChild(c_node):
24211  */
24212     __pyx_t_2 = (__pyx_v_old_pytypename != Py_None);
24213     __pyx_t_3 = (__pyx_t_2 != 0);
24214     if (__pyx_t_3) {
24215
24216       /* "lxml/objectify.pyx":1622
24217  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24218  *         if old_pytypename is not None:
24219  *             if old_pytypename == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
24220  *                 if not cetree.hasChild(c_node):
24221  *                     # only case where we should keep it,
24222  */
24223       __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)
24224       if (__pyx_t_3) {
24225
24226         /* "lxml/objectify.pyx":1623
24227  *         if old_pytypename is not None:
24228  *             if old_pytypename == TREE_PYTYPE_NAME:
24229  *                 if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
24230  *                     # only case where we should keep it,
24231  *                     # everything else is clear enough
24232  */
24233         __pyx_t_3 = ((!(hasChild(__pyx_v_c_node) != 0)) != 0);
24234         if (__pyx_t_3) {
24235
24236           /* "lxml/objectify.pyx":1626
24237  *                     # only case where we should keep it,
24238  *                     # everything else is clear enough
24239  *                     pytype = TREE_PYTYPE             # <<<<<<<<<<<<<<
24240  *             else:
24241  *                 if old_pytypename == 'none':
24242  */
24243           __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
24244           __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_4lxml_9objectify_TREE_PYTYPE);
24245
24246           /* "lxml/objectify.pyx":1623
24247  *         if old_pytypename is not None:
24248  *             if old_pytypename == TREE_PYTYPE_NAME:
24249  *                 if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
24250  *                     # only case where we should keep it,
24251  *                     # everything else is clear enough
24252  */
24253         }
24254
24255         /* "lxml/objectify.pyx":1622
24256  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24257  *         if old_pytypename is not None:
24258  *             if old_pytypename == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
24259  *                 if not cetree.hasChild(c_node):
24260  *                     # only case where we should keep it,
24261  */
24262         goto __pyx_L21;
24263       }
24264
24265       /* "lxml/objectify.pyx":1628
24266  *                     pytype = TREE_PYTYPE
24267  *             else:
24268  *                 if old_pytypename == 'none':             # <<<<<<<<<<<<<<
24269  *                     # transition from lxml 1.x
24270  *                     old_pytypename = "NoneType"
24271  */
24272       /*else*/ {
24273         __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)
24274         if (__pyx_t_3) {
24275
24276           /* "lxml/objectify.pyx":1630
24277  *                 if old_pytypename == 'none':
24278  *                     # transition from lxml 1.x
24279  *                     old_pytypename = "NoneType"             # <<<<<<<<<<<<<<
24280  *                 pytype = <PyType>_PYTYPE_DICT.get(old_pytypename)
24281  *                 if pytype is not None and pytype is not StrType:
24282  */
24283           __Pyx_INCREF(__pyx_n_s_NoneType);
24284           __Pyx_DECREF_SET(__pyx_v_old_pytypename, __pyx_n_s_NoneType);
24285
24286           /* "lxml/objectify.pyx":1628
24287  *                     pytype = TREE_PYTYPE
24288  *             else:
24289  *                 if old_pytypename == 'none':             # <<<<<<<<<<<<<<
24290  *                     # transition from lxml 1.x
24291  *                     old_pytypename = "NoneType"
24292  */
24293         }
24294
24295         /* "lxml/objectify.pyx":1631
24296  *                     # transition from lxml 1.x
24297  *                     old_pytypename = "NoneType"
24298  *                 pytype = <PyType>_PYTYPE_DICT.get(old_pytypename)             # <<<<<<<<<<<<<<
24299  *                 if pytype is not None and pytype is not StrType:
24300  *                     # StrType does not have a typecheck but is the
24301  */
24302         if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
24303           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
24304           __PYX_ERR(0, 1631, __pyx_L1_error)
24305         }
24306         __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)
24307         __Pyx_GOTREF(__pyx_t_6);
24308         __pyx_t_1 = __pyx_t_6;
24309         __Pyx_INCREF(__pyx_t_1);
24310         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24311         __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1));
24312         __pyx_t_1 = 0;
24313
24314         /* "lxml/objectify.pyx":1632
24315  *                     old_pytypename = "NoneType"
24316  *                 pytype = <PyType>_PYTYPE_DICT.get(old_pytypename)
24317  *                 if pytype is not None and pytype is not StrType:             # <<<<<<<<<<<<<<
24318  *                     # StrType does not have a typecheck but is the
24319  *                     # default anyway, so just accept it if given as
24320  */
24321         __pyx_t_2 = (((PyObject *)__pyx_v_pytype) != Py_None);
24322         __pyx_t_4 = (__pyx_t_2 != 0);
24323         if (__pyx_t_4) {
24324         } else {
24325           __pyx_t_3 = __pyx_t_4;
24326           goto __pyx_L25_bool_binop_done;
24327         }
24328         __pyx_t_4 = (__pyx_v_pytype != __pyx_v_StrType);
24329         __pyx_t_2 = (__pyx_t_4 != 0);
24330         __pyx_t_3 = __pyx_t_2;
24331         __pyx_L25_bool_binop_done:;
24332         if (__pyx_t_3) {
24333
24334           /* "lxml/objectify.pyx":1636
24335  *                     # default anyway, so just accept it if given as
24336  *                     # type information
24337  *                     pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
24338  * 
24339  *     if pytype is None:
24340  */
24341           __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)
24342           __Pyx_GOTREF(__pyx_t_1);
24343           __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1));
24344           __pyx_t_1 = 0;
24345
24346           /* "lxml/objectify.pyx":1632
24347  *                     old_pytypename = "NoneType"
24348  *                 pytype = <PyType>_PYTYPE_DICT.get(old_pytypename)
24349  *                 if pytype is not None and pytype is not StrType:             # <<<<<<<<<<<<<<
24350  *                     # StrType does not have a typecheck but is the
24351  *                     # default anyway, so just accept it if given as
24352  */
24353         }
24354       }
24355       __pyx_L21:;
24356
24357       /* "lxml/objectify.pyx":1621
24358  *         old_pytypename = cetree.attributeValueFromNsName(
24359  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24360  *         if old_pytypename is not None:             # <<<<<<<<<<<<<<
24361  *             if old_pytypename == TREE_PYTYPE_NAME:
24362  *                 if not cetree.hasChild(c_node):
24363  */
24364     }
24365
24366     /* "lxml/objectify.pyx":1617
24367  *                     typename = None
24368  * 
24369  *     if pytype is None and not ignore_pytype:             # <<<<<<<<<<<<<<
24370  *         # check that old pytype value is valid
24371  *         old_pytypename = cetree.attributeValueFromNsName(
24372  */
24373   }
24374
24375   /* "lxml/objectify.pyx":1638
24376  *                     pytype = _check_type(c_node, pytype)
24377  * 
24378  *     if pytype is None:             # <<<<<<<<<<<<<<
24379  *         # try to guess type
24380  *         if not cetree.hasChild(c_node):
24381  */
24382   __pyx_t_3 = (((PyObject *)__pyx_v_pytype) == Py_None);
24383   __pyx_t_2 = (__pyx_t_3 != 0);
24384   if (__pyx_t_2) {
24385
24386     /* "lxml/objectify.pyx":1640
24387  *     if pytype is None:
24388  *         # try to guess type
24389  *         if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
24390  *             # element has no children => data class
24391  *             pytype = _guessPyType(textOf(c_node), StrType)
24392  */
24393     __pyx_t_2 = ((!(hasChild(__pyx_v_c_node) != 0)) != 0);
24394     if (__pyx_t_2) {
24395
24396       /* "lxml/objectify.pyx":1642
24397  *         if not cetree.hasChild(c_node):
24398  *             # element has no children => data class
24399  *             pytype = _guessPyType(textOf(c_node), StrType)             # <<<<<<<<<<<<<<
24400  *         else:
24401  *             istree = 1
24402  */
24403       __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1642, __pyx_L1_error)
24404       __Pyx_GOTREF(__pyx_t_1);
24405       __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)
24406       __Pyx_GOTREF(__pyx_t_6);
24407       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24408       __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
24409       __pyx_t_6 = 0;
24410
24411       /* "lxml/objectify.pyx":1640
24412  *     if pytype is None:
24413  *         # try to guess type
24414  *         if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
24415  *             # element has no children => data class
24416  *             pytype = _guessPyType(textOf(c_node), StrType)
24417  */
24418       goto __pyx_L28;
24419     }
24420
24421     /* "lxml/objectify.pyx":1644
24422  *             pytype = _guessPyType(textOf(c_node), StrType)
24423  *         else:
24424  *             istree = 1             # <<<<<<<<<<<<<<
24425  * 
24426  *     if pytype is None:
24427  */
24428     /*else*/ {
24429       __pyx_v_istree = 1;
24430     }
24431     __pyx_L28:;
24432
24433     /* "lxml/objectify.pyx":1638
24434  *                     pytype = _check_type(c_node, pytype)
24435  * 
24436  *     if pytype is None:             # <<<<<<<<<<<<<<
24437  *         # try to guess type
24438  *         if not cetree.hasChild(c_node):
24439  */
24440   }
24441
24442   /* "lxml/objectify.pyx":1646
24443  *             istree = 1
24444  * 
24445  *     if pytype is None:             # <<<<<<<<<<<<<<
24446  *         # use default type for empty elements
24447  *         if cetree.hasText(c_node):
24448  */
24449   __pyx_t_2 = (((PyObject *)__pyx_v_pytype) == Py_None);
24450   __pyx_t_3 = (__pyx_t_2 != 0);
24451   if (__pyx_t_3) {
24452
24453     /* "lxml/objectify.pyx":1648
24454  *     if pytype is None:
24455  *         # use default type for empty elements
24456  *         if cetree.hasText(c_node):             # <<<<<<<<<<<<<<
24457  *             pytype = StrType
24458  *         else:
24459  */
24460     __pyx_t_3 = (hasText(__pyx_v_c_node) != 0);
24461     if (__pyx_t_3) {
24462
24463       /* "lxml/objectify.pyx":1649
24464  *         # use default type for empty elements
24465  *         if cetree.hasText(c_node):
24466  *             pytype = StrType             # <<<<<<<<<<<<<<
24467  *         else:
24468  *             pytype = empty_pytype
24469  */
24470       __Pyx_INCREF(((PyObject *)__pyx_v_StrType));
24471       __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_StrType);
24472
24473       /* "lxml/objectify.pyx":1648
24474  *     if pytype is None:
24475  *         # use default type for empty elements
24476  *         if cetree.hasText(c_node):             # <<<<<<<<<<<<<<
24477  *             pytype = StrType
24478  *         else:
24479  */
24480       goto __pyx_L30;
24481     }
24482
24483     /* "lxml/objectify.pyx":1651
24484  *             pytype = StrType
24485  *         else:
24486  *             pytype = empty_pytype             # <<<<<<<<<<<<<<
24487  *             if typename is None:
24488  *                 typename = empty_type_name
24489  */
24490     /*else*/ {
24491       __Pyx_INCREF(((PyObject *)__pyx_v_empty_pytype));
24492       __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_empty_pytype);
24493
24494       /* "lxml/objectify.pyx":1652
24495  *         else:
24496  *             pytype = empty_pytype
24497  *             if typename is None:             # <<<<<<<<<<<<<<
24498  *                 typename = empty_type_name
24499  * 
24500  */
24501       __pyx_t_3 = (__pyx_v_typename == Py_None);
24502       __pyx_t_2 = (__pyx_t_3 != 0);
24503       if (__pyx_t_2) {
24504
24505         /* "lxml/objectify.pyx":1653
24506  *             pytype = empty_pytype
24507  *             if typename is None:
24508  *                 typename = empty_type_name             # <<<<<<<<<<<<<<
24509  * 
24510  *     if pytype is not None:
24511  */
24512         __Pyx_INCREF(__pyx_v_empty_type_name);
24513         __Pyx_DECREF_SET(__pyx_v_typename, __pyx_v_empty_type_name);
24514
24515         /* "lxml/objectify.pyx":1652
24516  *         else:
24517  *             pytype = empty_pytype
24518  *             if typename is None:             # <<<<<<<<<<<<<<
24519  *                 typename = empty_type_name
24520  * 
24521  */
24522       }
24523     }
24524     __pyx_L30:;
24525
24526     /* "lxml/objectify.pyx":1646
24527  *             istree = 1
24528  * 
24529  *     if pytype is None:             # <<<<<<<<<<<<<<
24530  *         # use default type for empty elements
24531  *         if cetree.hasText(c_node):
24532  */
24533   }
24534
24535   /* "lxml/objectify.pyx":1655
24536  *                 typename = empty_type_name
24537  * 
24538  *     if pytype is not None:             # <<<<<<<<<<<<<<
24539  *         if typename is None:
24540  *             if not istree:
24541  */
24542   __pyx_t_2 = (((PyObject *)__pyx_v_pytype) != Py_None);
24543   __pyx_t_3 = (__pyx_t_2 != 0);
24544   if (__pyx_t_3) {
24545
24546     /* "lxml/objectify.pyx":1656
24547  * 
24548  *     if pytype is not None:
24549  *         if typename is None:             # <<<<<<<<<<<<<<
24550  *             if not istree:
24551  *                 if pytype._schema_types:
24552  */
24553     __pyx_t_3 = (__pyx_v_typename == Py_None);
24554     __pyx_t_2 = (__pyx_t_3 != 0);
24555     if (__pyx_t_2) {
24556
24557       /* "lxml/objectify.pyx":1657
24558  *     if pytype is not None:
24559  *         if typename is None:
24560  *             if not istree:             # <<<<<<<<<<<<<<
24561  *                 if pytype._schema_types:
24562  *                     # pytype->xsi:type is a 1:n mapping
24563  */
24564       __pyx_t_2 = ((!(__pyx_v_istree != 0)) != 0);
24565       if (__pyx_t_2) {
24566
24567         /* "lxml/objectify.pyx":1658
24568  *         if typename is None:
24569  *             if not istree:
24570  *                 if pytype._schema_types:             # <<<<<<<<<<<<<<
24571  *                     # pytype->xsi:type is a 1:n mapping
24572  *                     # simply take the first
24573  */
24574         __pyx_t_2 = (__pyx_v_pytype->_schema_types != Py_None)&&(PyList_GET_SIZE(__pyx_v_pytype->_schema_types) != 0);
24575         if (__pyx_t_2) {
24576
24577           /* "lxml/objectify.pyx":1661
24578  *                     # pytype->xsi:type is a 1:n mapping
24579  *                     # simply take the first
24580  *                     typename = pytype._schema_types[0]             # <<<<<<<<<<<<<<
24581  *         elif typename not in pytype._schema_types:
24582  *             typename = pytype._schema_types[0]
24583  */
24584           if (unlikely(__pyx_v_pytype->_schema_types == Py_None)) {
24585             PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24586             __PYX_ERR(0, 1661, __pyx_L1_error)
24587           }
24588           __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)
24589           __Pyx_GOTREF(__pyx_t_6);
24590           __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_6);
24591           __pyx_t_6 = 0;
24592
24593           /* "lxml/objectify.pyx":1658
24594  *         if typename is None:
24595  *             if not istree:
24596  *                 if pytype._schema_types:             # <<<<<<<<<<<<<<
24597  *                     # pytype->xsi:type is a 1:n mapping
24598  *                     # simply take the first
24599  */
24600         }
24601
24602         /* "lxml/objectify.pyx":1657
24603  *     if pytype is not None:
24604  *         if typename is None:
24605  *             if not istree:             # <<<<<<<<<<<<<<
24606  *                 if pytype._schema_types:
24607  *                     # pytype->xsi:type is a 1:n mapping
24608  */
24609       }
24610
24611       /* "lxml/objectify.pyx":1656
24612  * 
24613  *     if pytype is not None:
24614  *         if typename is None:             # <<<<<<<<<<<<<<
24615  *             if not istree:
24616  *                 if pytype._schema_types:
24617  */
24618       goto __pyx_L33;
24619     }
24620
24621     /* "lxml/objectify.pyx":1662
24622  *                     # simply take the first
24623  *                     typename = pytype._schema_types[0]
24624  *         elif typename not in pytype._schema_types:             # <<<<<<<<<<<<<<
24625  *             typename = pytype._schema_types[0]
24626  * 
24627  */
24628     __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)
24629     __pyx_t_3 = (__pyx_t_2 != 0);
24630     if (__pyx_t_3) {
24631
24632       /* "lxml/objectify.pyx":1663
24633  *                     typename = pytype._schema_types[0]
24634  *         elif typename not in pytype._schema_types:
24635  *             typename = pytype._schema_types[0]             # <<<<<<<<<<<<<<
24636  * 
24637  *     if annotate_xsi:
24638  */
24639       if (unlikely(__pyx_v_pytype->_schema_types == Py_None)) {
24640         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24641         __PYX_ERR(0, 1663, __pyx_L1_error)
24642       }
24643       __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)
24644       __Pyx_GOTREF(__pyx_t_6);
24645       __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_6);
24646       __pyx_t_6 = 0;
24647
24648       /* "lxml/objectify.pyx":1662
24649  *                     # simply take the first
24650  *                     typename = pytype._schema_types[0]
24651  *         elif typename not in pytype._schema_types:             # <<<<<<<<<<<<<<
24652  *             typename = pytype._schema_types[0]
24653  * 
24654  */
24655     }
24656     __pyx_L33:;
24657
24658     /* "lxml/objectify.pyx":1655
24659  *                 typename = empty_type_name
24660  * 
24661  *     if pytype is not None:             # <<<<<<<<<<<<<<
24662  *         if typename is None:
24663  *             if not istree:
24664  */
24665   }
24666
24667   /* "lxml/objectify.pyx":1665
24668  *             typename = pytype._schema_types[0]
24669  * 
24670  *     if annotate_xsi:             # <<<<<<<<<<<<<<
24671  *         if typename is None or istree:
24672  *             cetree.delAttributeFromNsName(
24673  */
24674   __pyx_t_3 = (__pyx_v_annotate_xsi != 0);
24675   if (__pyx_t_3) {
24676
24677     /* "lxml/objectify.pyx":1666
24678  * 
24679  *     if annotate_xsi:
24680  *         if typename is None or istree:             # <<<<<<<<<<<<<<
24681  *             cetree.delAttributeFromNsName(
24682  *                 c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
24683  */
24684     __pyx_t_2 = (__pyx_v_typename == Py_None);
24685     __pyx_t_4 = (__pyx_t_2 != 0);
24686     if (!__pyx_t_4) {
24687     } else {
24688       __pyx_t_3 = __pyx_t_4;
24689       goto __pyx_L38_bool_binop_done;
24690     }
24691     __pyx_t_4 = (__pyx_v_istree != 0);
24692     __pyx_t_3 = __pyx_t_4;
24693     __pyx_L38_bool_binop_done:;
24694     if (__pyx_t_3) {
24695
24696       /* "lxml/objectify.pyx":1667
24697  *     if annotate_xsi:
24698  *         if typename is None or istree:
24699  *             cetree.delAttributeFromNsName(             # <<<<<<<<<<<<<<
24700  *                 c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
24701  *         else:
24702  */
24703       (void)(delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"type")))));
24704
24705       /* "lxml/objectify.pyx":1666
24706  * 
24707  *     if annotate_xsi:
24708  *         if typename is None or istree:             # <<<<<<<<<<<<<<
24709  *             cetree.delAttributeFromNsName(
24710  *                 c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
24711  */
24712       goto __pyx_L37;
24713     }
24714
24715     /* "lxml/objectify.pyx":1671
24716  *         else:
24717  *             # update or create attribute
24718  *             typename_utf8 = cetree.utf8(typename)             # <<<<<<<<<<<<<<
24719  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24720  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24721  */
24722     /*else*/ {
24723       __pyx_t_6 = utf8(__pyx_v_typename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1671, __pyx_L1_error)
24724       __Pyx_GOTREF(__pyx_t_6);
24725       __pyx_v_typename_utf8 = __pyx_t_6;
24726       __pyx_t_6 = 0;
24727
24728       /* "lxml/objectify.pyx":1672
24729  *             # update or create attribute
24730  *             typename_utf8 = cetree.utf8(typename)
24731  *             c_ns = cetree.findOrBuildNodeNsPrefix(             # <<<<<<<<<<<<<<
24732  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24733  *             if c_ns is not NULL:
24734  */
24735       __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"))));
24736
24737       /* "lxml/objectify.pyx":1674
24738  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24739  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24740  *             if c_ns is not NULL:             # <<<<<<<<<<<<<<
24741  *                 if b':' in typename_utf8:
24742  *                     prefix, name = typename_utf8.split(b':', 1)
24743  */
24744       __pyx_t_3 = ((__pyx_v_c_ns != NULL) != 0);
24745       if (__pyx_t_3) {
24746
24747         /* "lxml/objectify.pyx":1675
24748  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24749  *             if c_ns is not NULL:
24750  *                 if b':' in typename_utf8:             # <<<<<<<<<<<<<<
24751  *                     prefix, name = typename_utf8.split(b':', 1)
24752  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24753  */
24754         __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)
24755         __pyx_t_4 = (__pyx_t_3 != 0);
24756         if (__pyx_t_4) {
24757
24758           /* "lxml/objectify.pyx":1676
24759  *             if c_ns is not NULL:
24760  *                 if b':' in typename_utf8:
24761  *                     prefix, name = typename_utf8.split(b':', 1)             # <<<<<<<<<<<<<<
24762  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24763  *                         typename_utf8 = name
24764  */
24765           __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)
24766           __Pyx_GOTREF(__pyx_t_6);
24767           if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
24768             PyObject* sequence = __pyx_t_6;
24769             Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
24770             if (unlikely(size != 2)) {
24771               if (size > 2) __Pyx_RaiseTooManyValuesError(2);
24772               else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
24773               __PYX_ERR(0, 1676, __pyx_L1_error)
24774             }
24775             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24776             if (likely(PyTuple_CheckExact(sequence))) {
24777               __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
24778               __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
24779             } else {
24780               __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
24781               __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
24782             }
24783             __Pyx_INCREF(__pyx_t_1);
24784             __Pyx_INCREF(__pyx_t_5);
24785             #else
24786             __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __pyx_L1_error)
24787             __Pyx_GOTREF(__pyx_t_1);
24788             __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1676, __pyx_L1_error)
24789             __Pyx_GOTREF(__pyx_t_5);
24790             #endif
24791             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24792           } else {
24793             Py_ssize_t index = -1;
24794             __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1676, __pyx_L1_error)
24795             __Pyx_GOTREF(__pyx_t_7);
24796             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24797             __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
24798             index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L42_unpacking_failed;
24799             __Pyx_GOTREF(__pyx_t_1);
24800             index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L42_unpacking_failed;
24801             __Pyx_GOTREF(__pyx_t_5);
24802             if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1676, __pyx_L1_error)
24803             __pyx_t_8 = NULL;
24804             __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24805             goto __pyx_L43_unpacking_done;
24806             __pyx_L42_unpacking_failed:;
24807             __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24808             __pyx_t_8 = NULL;
24809             if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
24810             __PYX_ERR(0, 1676, __pyx_L1_error)
24811             __pyx_L43_unpacking_done:;
24812           }
24813           __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_1);
24814           __pyx_t_1 = 0;
24815           __pyx_v_name = __pyx_t_5;
24816           __pyx_t_5 = 0;
24817
24818           /* "lxml/objectify.pyx":1677
24819  *                 if b':' in typename_utf8:
24820  *                     prefix, name = typename_utf8.split(b':', 1)
24821  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':             # <<<<<<<<<<<<<<
24822  *                         typename_utf8 = name
24823  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24824  */
24825           __pyx_t_3 = ((__pyx_v_c_ns->prefix == NULL) != 0);
24826           if (!__pyx_t_3) {
24827           } else {
24828             __pyx_t_4 = __pyx_t_3;
24829             goto __pyx_L45_bool_binop_done;
24830           }
24831           __pyx_t_3 = (((__pyx_v_c_ns->prefix[0]) == '\x00') != 0);
24832           __pyx_t_4 = __pyx_t_3;
24833           __pyx_L45_bool_binop_done:;
24834           if (__pyx_t_4) {
24835
24836             /* "lxml/objectify.pyx":1678
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  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24842  */
24843             __Pyx_INCREF(__pyx_v_name);
24844             __Pyx_DECREF_SET(__pyx_v_typename_utf8, __pyx_v_name);
24845
24846             /* "lxml/objectify.pyx":1677
24847  *                 if b':' in typename_utf8:
24848  *                     prefix, name = typename_utf8.split(b':', 1)
24849  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':             # <<<<<<<<<<<<<<
24850  *                         typename_utf8 = name
24851  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24852  */
24853             goto __pyx_L44;
24854           }
24855
24856           /* "lxml/objectify.pyx":1679
24857  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24858  *                         typename_utf8 = name
24859  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:             # <<<<<<<<<<<<<<
24860  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24861  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24862  */
24863           __pyx_t_4 = ((xmlStrcmp((const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix), __pyx_v_c_ns->prefix) != 0) != 0);
24864           if (__pyx_t_4) {
24865
24866             /* "lxml/objectify.pyx":1680
24867  *                         typename_utf8 = name
24868  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24869  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name             # <<<<<<<<<<<<<<
24870  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24871  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
24872  */
24873             __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)
24874             __Pyx_GOTREF(__pyx_t_6);
24875             __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1680, __pyx_L1_error)
24876             __Pyx_GOTREF(__pyx_t_5);
24877             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24878             __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1680, __pyx_L1_error)
24879             __Pyx_GOTREF(__pyx_t_6);
24880             __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24881             __Pyx_DECREF_SET(__pyx_v_typename_utf8, __pyx_t_6);
24882             __pyx_t_6 = 0;
24883
24884             /* "lxml/objectify.pyx":1679
24885  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24886  *                         typename_utf8 = name
24887  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:             # <<<<<<<<<<<<<<
24888  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24889  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24890  */
24891           }
24892           __pyx_L44:;
24893
24894           /* "lxml/objectify.pyx":1675
24895  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24896  *             if c_ns is not NULL:
24897  *                 if b':' in typename_utf8:             # <<<<<<<<<<<<<<
24898  *                     prefix, name = typename_utf8.split(b':', 1)
24899  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24900  */
24901           goto __pyx_L41;
24902         }
24903
24904         /* "lxml/objectify.pyx":1681
24905  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24906  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24907  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':             # <<<<<<<<<<<<<<
24908  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
24909  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24910  */
24911         __pyx_t_3 = ((__pyx_v_c_ns->prefix != NULL) != 0);
24912         if (__pyx_t_3) {
24913         } else {
24914           __pyx_t_4 = __pyx_t_3;
24915           goto __pyx_L47_bool_binop_done;
24916         }
24917         __pyx_t_3 = (((__pyx_v_c_ns->prefix[0]) != '\x00') != 0);
24918         __pyx_t_4 = __pyx_t_3;
24919         __pyx_L47_bool_binop_done:;
24920         if (__pyx_t_4) {
24921
24922           /* "lxml/objectify.pyx":1682
24923  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24924  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24925  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8             # <<<<<<<<<<<<<<
24926  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24927  *                 doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
24928  */
24929           __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)
24930           __Pyx_GOTREF(__pyx_t_6);
24931           __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1682, __pyx_L1_error)
24932           __Pyx_GOTREF(__pyx_t_5);
24933           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24934           __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_typename_utf8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1682, __pyx_L1_error)
24935           __Pyx_GOTREF(__pyx_t_6);
24936           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24937           __Pyx_DECREF_SET(__pyx_v_typename_utf8, __pyx_t_6);
24938           __pyx_t_6 = 0;
24939
24940           /* "lxml/objectify.pyx":1681
24941  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24942  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24943  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':             # <<<<<<<<<<<<<<
24944  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
24945  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24946  */
24947         }
24948         __pyx_L41:;
24949
24950         /* "lxml/objectify.pyx":1674
24951  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24952  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24953  *             if c_ns is not NULL:             # <<<<<<<<<<<<<<
24954  *                 if b':' in typename_utf8:
24955  *                     prefix, name = typename_utf8.split(b':', 1)
24956  */
24957       }
24958
24959       /* "lxml/objectify.pyx":1683
24960  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24961  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
24962  *             c_ns = cetree.findOrBuildNodeNsPrefix(             # <<<<<<<<<<<<<<
24963  *                 doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
24964  *             tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))
24965  */
24966       __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"))));
24967
24968       /* "lxml/objectify.pyx":1685
24969  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24970  *                 doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
24971  *             tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))             # <<<<<<<<<<<<<<
24972  * 
24973  *     if annotate_pytype:
24974  */
24975       (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)));
24976     }
24977     __pyx_L37:;
24978
24979     /* "lxml/objectify.pyx":1665
24980  *             typename = pytype._schema_types[0]
24981  * 
24982  *     if annotate_xsi:             # <<<<<<<<<<<<<<
24983  *         if typename is None or istree:
24984  *             cetree.delAttributeFromNsName(
24985  */
24986   }
24987
24988   /* "lxml/objectify.pyx":1687
24989  *             tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))
24990  * 
24991  *     if annotate_pytype:             # <<<<<<<<<<<<<<
24992  *         if pytype is None:
24993  *             # delete attribute if it exists
24994  */
24995   __pyx_t_4 = (__pyx_v_annotate_pytype != 0);
24996   if (__pyx_t_4) {
24997
24998     /* "lxml/objectify.pyx":1688
24999  * 
25000  *     if annotate_pytype:
25001  *         if pytype is None:             # <<<<<<<<<<<<<<
25002  *             # delete attribute if it exists
25003  *             cetree.delAttributeFromNsName(
25004  */
25005     __pyx_t_4 = (((PyObject *)__pyx_v_pytype) == Py_None);
25006     __pyx_t_3 = (__pyx_t_4 != 0);
25007     if (__pyx_t_3) {
25008
25009       /* "lxml/objectify.pyx":1690
25010  *         if pytype is None:
25011  *             # delete attribute if it exists
25012  *             cetree.delAttributeFromNsName(             # <<<<<<<<<<<<<<
25013  *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
25014  *         else:
25015  */
25016       (void)(delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME));
25017
25018       /* "lxml/objectify.pyx":1688
25019  * 
25020  *     if annotate_pytype:
25021  *         if pytype is None:             # <<<<<<<<<<<<<<
25022  *             # delete attribute if it exists
25023  *             cetree.delAttributeFromNsName(
25024  */
25025       goto __pyx_L50;
25026     }
25027
25028     /* "lxml/objectify.pyx":1694
25029  *         else:
25030  *             # update or create attribute
25031  *             c_ns = cetree.findOrBuildNodeNsPrefix(             # <<<<<<<<<<<<<<
25032  *                 doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')
25033  *             pytype_name = cetree.utf8(pytype.name)
25034  */
25035     /*else*/ {
25036
25037       /* "lxml/objectify.pyx":1695
25038  *             # update or create attribute
25039  *             c_ns = cetree.findOrBuildNodeNsPrefix(
25040  *                 doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')             # <<<<<<<<<<<<<<
25041  *             pytype_name = cetree.utf8(pytype.name)
25042  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
25043  */
25044       __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"))));
25045
25046       /* "lxml/objectify.pyx":1696
25047  *             c_ns = cetree.findOrBuildNodeNsPrefix(
25048  *                 doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')
25049  *             pytype_name = cetree.utf8(pytype.name)             # <<<<<<<<<<<<<<
25050  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
25051  *                               _xcstr(pytype_name))
25052  */
25053       __pyx_t_6 = __pyx_v_pytype->name;
25054       __Pyx_INCREF(__pyx_t_6);
25055       __pyx_t_5 = utf8(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1696, __pyx_L1_error)
25056       __Pyx_GOTREF(__pyx_t_5);
25057       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25058       __pyx_v_pytype_name = ((PyObject*)__pyx_t_5);
25059       __pyx_t_5 = 0;
25060
25061       /* "lxml/objectify.pyx":1697
25062  *                 doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')
25063  *             pytype_name = cetree.utf8(pytype.name)
25064  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,             # <<<<<<<<<<<<<<
25065  *                               _xcstr(pytype_name))
25066  *             if pytype is NoneType:
25067  */
25068       (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)));
25069
25070       /* "lxml/objectify.pyx":1699
25071  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
25072  *                               _xcstr(pytype_name))
25073  *             if pytype is NoneType:             # <<<<<<<<<<<<<<
25074  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
25075  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
25076  */
25077       __pyx_t_3 = (__pyx_v_pytype == __pyx_v_NoneType);
25078       __pyx_t_4 = (__pyx_t_3 != 0);
25079       if (__pyx_t_4) {
25080
25081         /* "lxml/objectify.pyx":1700
25082  *                               _xcstr(pytype_name))
25083  *             if pytype is NoneType:
25084  *                 c_ns = cetree.findOrBuildNodeNsPrefix(             # <<<<<<<<<<<<<<
25085  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
25086  *                 tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"nil", <unsigned char*>"true")
25087  */
25088         __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"))));
25089
25090         /* "lxml/objectify.pyx":1702
25091  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
25092  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
25093  *                 tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"nil", <unsigned char*>"true")             # <<<<<<<<<<<<<<
25094  * 
25095  *     return 0
25096  */
25097         (void)(xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, ((unsigned char *)((unsigned char *)((char const *)"nil"))), ((unsigned char *)((unsigned char *)((char const *)"true")))));
25098
25099         /* "lxml/objectify.pyx":1699
25100  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
25101  *                               _xcstr(pytype_name))
25102  *             if pytype is NoneType:             # <<<<<<<<<<<<<<
25103  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
25104  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
25105  */
25106       }
25107     }
25108     __pyx_L50:;
25109
25110     /* "lxml/objectify.pyx":1687
25111  *             tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))
25112  * 
25113  *     if annotate_pytype:             # <<<<<<<<<<<<<<
25114  *         if pytype is None:
25115  *             # delete attribute if it exists
25116  */
25117   }
25118
25119   /* "lxml/objectify.pyx":1704
25120  *                 tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"nil", <unsigned char*>"true")
25121  * 
25122  *     return 0             # <<<<<<<<<<<<<<
25123  * 
25124  * cdef object _strip_attributes = etree.strip_attributes
25125  */
25126   __pyx_r = 0;
25127   goto __pyx_L0;
25128
25129   /* "lxml/objectify.pyx":1585
25130  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
25131  * 
25132  * cdef int _annotate_element(tree.xmlNode* c_node, _Document doc,             # <<<<<<<<<<<<<<
25133  *                            bint annotate_xsi, bint annotate_pytype,
25134  *                            bint ignore_xsi, bint ignore_pytype,
25135  */
25136
25137   /* function exit code */
25138   __pyx_L1_error:;
25139   __Pyx_XDECREF(__pyx_t_1);
25140   __Pyx_XDECREF(__pyx_t_5);
25141   __Pyx_XDECREF(__pyx_t_6);
25142   __Pyx_XDECREF(__pyx_t_7);
25143   __Pyx_AddTraceback("lxml.objectify._annotate_element", __pyx_clineno, __pyx_lineno, __pyx_filename);
25144   __pyx_r = -1;
25145   __pyx_L0:;
25146   __Pyx_XDECREF((PyObject *)__pyx_v_pytype);
25147   __Pyx_XDECREF(__pyx_v_typename);
25148   __Pyx_XDECREF(__pyx_v_prefix);
25149   __Pyx_XDECREF(__pyx_v_old_pytypename);
25150   __Pyx_XDECREF(__pyx_v_typename_utf8);
25151   __Pyx_XDECREF(__pyx_v_name);
25152   __Pyx_XDECREF(__pyx_v_pytype_name);
25153   __Pyx_RefNannyFinishContext();
25154   return __pyx_r;
25155 }
25156
25157 /* "lxml/objectify.pyx":1709
25158  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
25159  * 
25160  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
25161  *                bint xsi_nil=False, bint cleanup_namespaces=False):
25162  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
25163  */
25164
25165 /* Python wrapper */
25166 static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25167 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    ";
25168 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};
25169 static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25170   PyObject *__pyx_v_element_or_tree = 0;
25171   int __pyx_v_pytype;
25172   int __pyx_v_xsi;
25173   int __pyx_v_xsi_nil;
25174   int __pyx_v_cleanup_namespaces;
25175   int __pyx_lineno = 0;
25176   const char *__pyx_filename = NULL;
25177   int __pyx_clineno = 0;
25178   PyObject *__pyx_r = 0;
25179   __Pyx_RefNannyDeclarations
25180   __Pyx_RefNannySetupContext("deannotate (wrapper)", 0);
25181   {
25182     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};
25183     PyObject* values[5] = {0,0,0,0,0};
25184     if (unlikely(__pyx_kwds)) {
25185       Py_ssize_t kw_args;
25186       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25187       switch (pos_args) {
25188         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25189         CYTHON_FALLTHROUGH;
25190         case  0: break;
25191         default: goto __pyx_L5_argtuple_error;
25192       }
25193       kw_args = PyDict_Size(__pyx_kwds);
25194       switch (pos_args) {
25195         case  0:
25196         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element_or_tree)) != 0)) kw_args--;
25197         else goto __pyx_L5_argtuple_error;
25198       }
25199       if (kw_args > 0 && likely(kw_args <= 4)) {
25200         Py_ssize_t index;
25201         for (index = 1; index < 5 && kw_args > 0; index++) {
25202           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
25203           if (value) { values[index] = value; kw_args--; }
25204         }
25205       }
25206       if (unlikely(kw_args > 0)) {
25207         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deannotate") < 0)) __PYX_ERR(0, 1709, __pyx_L3_error)
25208       }
25209     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
25210       goto __pyx_L5_argtuple_error;
25211     } else {
25212       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25213     }
25214     __pyx_v_element_or_tree = values[0];
25215     if (values[1]) {
25216       __pyx_v_pytype = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_pytype == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1709, __pyx_L3_error)
25217     } else {
25218       __pyx_v_pytype = ((int)((int)1));
25219     }
25220     if (values[2]) {
25221       __pyx_v_xsi = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_xsi == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1709, __pyx_L3_error)
25222     } else {
25223       __pyx_v_xsi = ((int)((int)1));
25224     }
25225     if (values[3]) {
25226       __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)
25227     } else {
25228
25229       /* "lxml/objectify.pyx":1710
25230  * 
25231  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,
25232  *                bint xsi_nil=False, bint cleanup_namespaces=False):             # <<<<<<<<<<<<<<
25233  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
25234  * 
25235  */
25236       __pyx_v_xsi_nil = ((int)((int)0));
25237     }
25238     if (values[4]) {
25239       __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)
25240     } else {
25241       __pyx_v_cleanup_namespaces = ((int)((int)0));
25242     }
25243   }
25244   goto __pyx_L4_argument_unpacking_done;
25245   __pyx_L5_argtuple_error:;
25246   __Pyx_RaiseArgtupleInvalid("deannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1709, __pyx_L3_error)
25247   __pyx_L3_error:;
25248   __Pyx_AddTraceback("lxml.objectify.deannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
25249   __Pyx_RefNannyFinishContext();
25250   return NULL;
25251   __pyx_L4_argument_unpacking_done:;
25252   __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);
25253
25254   /* "lxml/objectify.pyx":1709
25255  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
25256  * 
25257  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
25258  *                bint xsi_nil=False, bint cleanup_namespaces=False):
25259  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
25260  */
25261
25262   /* function exit code */
25263   __Pyx_RefNannyFinishContext();
25264   return __pyx_r;
25265 }
25266
25267 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) {
25268   PyObject *__pyx_v_attribute_names = 0;
25269   PyObject *__pyx_r = NULL;
25270   __Pyx_RefNannyDeclarations
25271   PyObject *__pyx_t_1 = NULL;
25272   int __pyx_t_2;
25273   int __pyx_t_3;
25274   PyObject *__pyx_t_4 = NULL;
25275   PyObject *__pyx_t_5 = NULL;
25276   int __pyx_lineno = 0;
25277   const char *__pyx_filename = NULL;
25278   int __pyx_clineno = 0;
25279   __Pyx_RefNannySetupContext("deannotate", 0);
25280
25281   /* "lxml/objectify.pyx":1726
25282  *     the tree, pass the option ``cleanup_namespaces=True``.
25283  *     """
25284  *     cdef list attribute_names = []             # <<<<<<<<<<<<<<
25285  * 
25286  *     if pytype:
25287  */
25288   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1726, __pyx_L1_error)
25289   __Pyx_GOTREF(__pyx_t_1);
25290   __pyx_v_attribute_names = ((PyObject*)__pyx_t_1);
25291   __pyx_t_1 = 0;
25292
25293   /* "lxml/objectify.pyx":1728
25294  *     cdef list attribute_names = []
25295  * 
25296  *     if pytype:             # <<<<<<<<<<<<<<
25297  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25298  *     if xsi:
25299  */
25300   __pyx_t_2 = (__pyx_v_pytype != 0);
25301   if (__pyx_t_2) {
25302
25303     /* "lxml/objectify.pyx":1729
25304  * 
25305  *     if pytype:
25306  *         attribute_names.append(PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<<
25307  *     if xsi:
25308  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25309  */
25310     __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1729, __pyx_L1_error)
25311     __Pyx_GOTREF(__pyx_t_1);
25312     __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)
25313     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25314
25315     /* "lxml/objectify.pyx":1728
25316  *     cdef list attribute_names = []
25317  * 
25318  *     if pytype:             # <<<<<<<<<<<<<<
25319  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25320  *     if xsi:
25321  */
25322   }
25323
25324   /* "lxml/objectify.pyx":1730
25325  *     if pytype:
25326  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25327  *     if xsi:             # <<<<<<<<<<<<<<
25328  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25329  *     if xsi_nil:
25330  */
25331   __pyx_t_2 = (__pyx_v_xsi != 0);
25332   if (__pyx_t_2) {
25333
25334     /* "lxml/objectify.pyx":1731
25335  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25336  *     if xsi:
25337  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)             # <<<<<<<<<<<<<<
25338  *     if xsi_nil:
25339  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
25340  */
25341     __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR;
25342     __Pyx_INCREF(__pyx_t_1);
25343     __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)
25344     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25345
25346     /* "lxml/objectify.pyx":1730
25347  *     if pytype:
25348  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25349  *     if xsi:             # <<<<<<<<<<<<<<
25350  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25351  *     if xsi_nil:
25352  */
25353   }
25354
25355   /* "lxml/objectify.pyx":1732
25356  *     if xsi:
25357  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25358  *     if xsi_nil:             # <<<<<<<<<<<<<<
25359  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
25360  * 
25361  */
25362   __pyx_t_2 = (__pyx_v_xsi_nil != 0);
25363   if (__pyx_t_2) {
25364
25365     /* "lxml/objectify.pyx":1733
25366  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25367  *     if xsi_nil:
25368  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)             # <<<<<<<<<<<<<<
25369  * 
25370  *     _strip_attributes(element_or_tree, *attribute_names)
25371  */
25372     __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
25373     __Pyx_INCREF(__pyx_t_1);
25374     __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)
25375     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25376
25377     /* "lxml/objectify.pyx":1732
25378  *     if xsi:
25379  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25380  *     if xsi_nil:             # <<<<<<<<<<<<<<
25381  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
25382  * 
25383  */
25384   }
25385
25386   /* "lxml/objectify.pyx":1735
25387  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
25388  * 
25389  *     _strip_attributes(element_or_tree, *attribute_names)             # <<<<<<<<<<<<<<
25390  *     if cleanup_namespaces:
25391  *         _cleanup_namespaces(element_or_tree)
25392  */
25393   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error)
25394   __Pyx_GOTREF(__pyx_t_1);
25395   __Pyx_INCREF(__pyx_v_element_or_tree);
25396   __Pyx_GIVEREF(__pyx_v_element_or_tree);
25397   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_element_or_tree);
25398   __pyx_t_4 = PySequence_Tuple(__pyx_v_attribute_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1735, __pyx_L1_error)
25399   __Pyx_GOTREF(__pyx_t_4);
25400   __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1735, __pyx_L1_error)
25401   __Pyx_GOTREF(__pyx_t_5);
25402   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25403   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25404   __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)
25405   __Pyx_GOTREF(__pyx_t_4);
25406   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25407   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25408
25409   /* "lxml/objectify.pyx":1736
25410  * 
25411  *     _strip_attributes(element_or_tree, *attribute_names)
25412  *     if cleanup_namespaces:             # <<<<<<<<<<<<<<
25413  *         _cleanup_namespaces(element_or_tree)
25414  * 
25415  */
25416   __pyx_t_2 = (__pyx_v_cleanup_namespaces != 0);
25417   if (__pyx_t_2) {
25418
25419     /* "lxml/objectify.pyx":1737
25420  *     _strip_attributes(element_or_tree, *attribute_names)
25421  *     if cleanup_namespaces:
25422  *         _cleanup_namespaces(element_or_tree)             # <<<<<<<<<<<<<<
25423  * 
25424  * ################################################################################
25425  */
25426     __Pyx_INCREF(__pyx_v_4lxml_9objectify__cleanup_namespaces);
25427     __pyx_t_5 = __pyx_v_4lxml_9objectify__cleanup_namespaces; __pyx_t_1 = NULL;
25428     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
25429       __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
25430       if (likely(__pyx_t_1)) {
25431         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
25432         __Pyx_INCREF(__pyx_t_1);
25433         __Pyx_INCREF(function);
25434         __Pyx_DECREF_SET(__pyx_t_5, function);
25435       }
25436     }
25437     __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);
25438     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25439     if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1737, __pyx_L1_error)
25440     __Pyx_GOTREF(__pyx_t_4);
25441     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25442     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25443
25444     /* "lxml/objectify.pyx":1736
25445  * 
25446  *     _strip_attributes(element_or_tree, *attribute_names)
25447  *     if cleanup_namespaces:             # <<<<<<<<<<<<<<
25448  *         _cleanup_namespaces(element_or_tree)
25449  * 
25450  */
25451   }
25452
25453   /* "lxml/objectify.pyx":1709
25454  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
25455  * 
25456  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
25457  *                bint xsi_nil=False, bint cleanup_namespaces=False):
25458  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
25459  */
25460
25461   /* function exit code */
25462   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25463   goto __pyx_L0;
25464   __pyx_L1_error:;
25465   __Pyx_XDECREF(__pyx_t_1);
25466   __Pyx_XDECREF(__pyx_t_4);
25467   __Pyx_XDECREF(__pyx_t_5);
25468   __Pyx_AddTraceback("lxml.objectify.deannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
25469   __pyx_r = NULL;
25470   __pyx_L0:;
25471   __Pyx_XDECREF(__pyx_v_attribute_names);
25472   __Pyx_XGIVEREF(__pyx_r);
25473   __Pyx_RefNannyFinishContext();
25474   return __pyx_r;
25475 }
25476
25477 /* "lxml/objectify.pyx":1749
25478  * objectify_parser = __DEFAULT_PARSER
25479  * 
25480  * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
25481  *     u"""set_default_parser(new_parser = None)
25482  * 
25483  */
25484
25485 /* Python wrapper */
25486 static PyObject *__pyx_pw_4lxml_9objectify_29set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25487 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    ";
25488 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};
25489 static PyObject *__pyx_pw_4lxml_9objectify_29set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25490   PyObject *__pyx_v_new_parser = 0;
25491   int __pyx_lineno = 0;
25492   const char *__pyx_filename = NULL;
25493   int __pyx_clineno = 0;
25494   PyObject *__pyx_r = 0;
25495   __Pyx_RefNannyDeclarations
25496   __Pyx_RefNannySetupContext("set_default_parser (wrapper)", 0);
25497   {
25498     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_parser,0};
25499     PyObject* values[1] = {0};
25500     values[0] = ((PyObject *)((PyObject *)Py_None));
25501     if (unlikely(__pyx_kwds)) {
25502       Py_ssize_t kw_args;
25503       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25504       switch (pos_args) {
25505         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25506         CYTHON_FALLTHROUGH;
25507         case  0: break;
25508         default: goto __pyx_L5_argtuple_error;
25509       }
25510       kw_args = PyDict_Size(__pyx_kwds);
25511       switch (pos_args) {
25512         case  0:
25513         if (kw_args > 0) {
25514           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_parser);
25515           if (value) { values[0] = value; kw_args--; }
25516         }
25517       }
25518       if (unlikely(kw_args > 0)) {
25519         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_default_parser") < 0)) __PYX_ERR(0, 1749, __pyx_L3_error)
25520       }
25521     } else {
25522       switch (PyTuple_GET_SIZE(__pyx_args)) {
25523         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25524         CYTHON_FALLTHROUGH;
25525         case  0: break;
25526         default: goto __pyx_L5_argtuple_error;
25527       }
25528     }
25529     __pyx_v_new_parser = values[0];
25530   }
25531   goto __pyx_L4_argument_unpacking_done;
25532   __pyx_L5_argtuple_error:;
25533   __Pyx_RaiseArgtupleInvalid("set_default_parser", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1749, __pyx_L3_error)
25534   __pyx_L3_error:;
25535   __Pyx_AddTraceback("lxml.objectify.set_default_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
25536   __Pyx_RefNannyFinishContext();
25537   return NULL;
25538   __pyx_L4_argument_unpacking_done:;
25539   __pyx_r = __pyx_pf_4lxml_9objectify_28set_default_parser(__pyx_self, __pyx_v_new_parser);
25540
25541   /* function exit code */
25542   __Pyx_RefNannyFinishContext();
25543   return __pyx_r;
25544 }
25545
25546 static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_parser) {
25547   PyObject *__pyx_r = NULL;
25548   __Pyx_RefNannyDeclarations
25549   int __pyx_t_1;
25550   int __pyx_t_2;
25551   PyObject *__pyx_t_3 = NULL;
25552   int __pyx_lineno = 0;
25553   const char *__pyx_filename = NULL;
25554   int __pyx_clineno = 0;
25555   __Pyx_RefNannySetupContext("set_default_parser", 0);
25556
25557   /* "lxml/objectify.pyx":1760
25558  *     """
25559  *     global objectify_parser
25560  *     if new_parser is None:             # <<<<<<<<<<<<<<
25561  *         objectify_parser = __DEFAULT_PARSER
25562  *     elif isinstance(new_parser, etree.XMLParser):
25563  */
25564   __pyx_t_1 = (__pyx_v_new_parser == Py_None);
25565   __pyx_t_2 = (__pyx_t_1 != 0);
25566   if (__pyx_t_2) {
25567
25568     /* "lxml/objectify.pyx":1761
25569  *     global objectify_parser
25570  *     if new_parser is None:
25571  *         objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<<
25572  *     elif isinstance(new_parser, etree.XMLParser):
25573  *         objectify_parser = new_parser
25574  */
25575     __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
25576     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
25577     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_4lxml_9objectify___DEFAULT_PARSER);
25578     __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
25579
25580     /* "lxml/objectify.pyx":1760
25581  *     """
25582  *     global objectify_parser
25583  *     if new_parser is None:             # <<<<<<<<<<<<<<
25584  *         objectify_parser = __DEFAULT_PARSER
25585  *     elif isinstance(new_parser, etree.XMLParser):
25586  */
25587     goto __pyx_L3;
25588   }
25589
25590   /* "lxml/objectify.pyx":1762
25591  *     if new_parser is None:
25592  *         objectify_parser = __DEFAULT_PARSER
25593  *     elif isinstance(new_parser, etree.XMLParser):             # <<<<<<<<<<<<<<
25594  *         objectify_parser = new_parser
25595  *     else:
25596  */
25597   __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)
25598   __Pyx_GOTREF(__pyx_t_3);
25599   __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)
25600   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25601   __pyx_t_1 = (__pyx_t_2 != 0);
25602   if (likely(__pyx_t_1)) {
25603
25604     /* "lxml/objectify.pyx":1763
25605  *         objectify_parser = __DEFAULT_PARSER
25606  *     elif isinstance(new_parser, etree.XMLParser):
25607  *         objectify_parser = new_parser             # <<<<<<<<<<<<<<
25608  *     else:
25609  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
25610  */
25611     __Pyx_INCREF(__pyx_v_new_parser);
25612     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
25613     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_new_parser);
25614     __Pyx_GIVEREF(__pyx_v_new_parser);
25615
25616     /* "lxml/objectify.pyx":1762
25617  *     if new_parser is None:
25618  *         objectify_parser = __DEFAULT_PARSER
25619  *     elif isinstance(new_parser, etree.XMLParser):             # <<<<<<<<<<<<<<
25620  *         objectify_parser = new_parser
25621  *     else:
25622  */
25623     goto __pyx_L3;
25624   }
25625
25626   /* "lxml/objectify.pyx":1765
25627  *         objectify_parser = new_parser
25628  *     else:
25629  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"             # <<<<<<<<<<<<<<
25630  * 
25631  * def makeparser(**kw):
25632  */
25633   /*else*/ {
25634     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_parser_must_inherit_from_lxml_et, 0, 0);
25635     __PYX_ERR(0, 1765, __pyx_L1_error)
25636   }
25637   __pyx_L3:;
25638
25639   /* "lxml/objectify.pyx":1749
25640  * objectify_parser = __DEFAULT_PARSER
25641  * 
25642  * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
25643  *     u"""set_default_parser(new_parser = None)
25644  * 
25645  */
25646
25647   /* function exit code */
25648   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25649   goto __pyx_L0;
25650   __pyx_L1_error:;
25651   __Pyx_XDECREF(__pyx_t_3);
25652   __Pyx_AddTraceback("lxml.objectify.set_default_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
25653   __pyx_r = NULL;
25654   __pyx_L0:;
25655   __Pyx_XGIVEREF(__pyx_r);
25656   __Pyx_RefNannyFinishContext();
25657   return __pyx_r;
25658 }
25659
25660 /* "lxml/objectify.pyx":1767
25661  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
25662  * 
25663  * def makeparser(**kw):             # <<<<<<<<<<<<<<
25664  *     u"""makeparser(remove_blank_text=True, **kw)
25665  * 
25666  */
25667
25668 /* Python wrapper */
25669 static PyObject *__pyx_pw_4lxml_9objectify_31makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25670 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    ";
25671 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};
25672 static PyObject *__pyx_pw_4lxml_9objectify_31makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25673   PyObject *__pyx_v_kw = 0;
25674   PyObject *__pyx_r = 0;
25675   __Pyx_RefNannyDeclarations
25676   __Pyx_RefNannySetupContext("makeparser (wrapper)", 0);
25677   if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
25678     __Pyx_RaiseArgtupleInvalid("makeparser", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
25679   if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "makeparser", 1))) return NULL;
25680   __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
25681   __Pyx_GOTREF(__pyx_v_kw);
25682   __pyx_r = __pyx_pf_4lxml_9objectify_30makeparser(__pyx_self, __pyx_v_kw);
25683
25684   /* function exit code */
25685   __Pyx_XDECREF(__pyx_v_kw);
25686   __Pyx_RefNannyFinishContext();
25687   return __pyx_r;
25688 }
25689
25690 static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kw) {
25691   PyObject *__pyx_v_parser = NULL;
25692   PyObject *__pyx_r = NULL;
25693   __Pyx_RefNannyDeclarations
25694   int __pyx_t_1;
25695   int __pyx_t_2;
25696   PyObject *__pyx_t_3 = NULL;
25697   PyObject *__pyx_t_4 = NULL;
25698   PyObject *__pyx_t_5 = NULL;
25699   PyObject *__pyx_t_6 = NULL;
25700   int __pyx_lineno = 0;
25701   const char *__pyx_filename = NULL;
25702   int __pyx_clineno = 0;
25703   __Pyx_RefNannySetupContext("makeparser", 0);
25704
25705   /* "lxml/objectify.pyx":1777
25706  *     ``remove_blank_text`` boolean keyword option yourself.
25707  *     """
25708  *     if 'remove_blank_text' not in kw:             # <<<<<<<<<<<<<<
25709  *         kw['remove_blank_text'] = True
25710  *     parser = etree.XMLParser(**kw)
25711  */
25712   __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)
25713   __pyx_t_2 = (__pyx_t_1 != 0);
25714   if (__pyx_t_2) {
25715
25716     /* "lxml/objectify.pyx":1778
25717  *     """
25718  *     if 'remove_blank_text' not in kw:
25719  *         kw['remove_blank_text'] = True             # <<<<<<<<<<<<<<
25720  *     parser = etree.XMLParser(**kw)
25721  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
25722  */
25723     if (unlikely(PyDict_SetItem(__pyx_v_kw, __pyx_n_s_remove_blank_text, Py_True) < 0)) __PYX_ERR(0, 1778, __pyx_L1_error)
25724
25725     /* "lxml/objectify.pyx":1777
25726  *     ``remove_blank_text`` boolean keyword option yourself.
25727  *     """
25728  *     if 'remove_blank_text' not in kw:             # <<<<<<<<<<<<<<
25729  *         kw['remove_blank_text'] = True
25730  *     parser = etree.XMLParser(**kw)
25731  */
25732   }
25733
25734   /* "lxml/objectify.pyx":1779
25735  *     if 'remove_blank_text' not in kw:
25736  *         kw['remove_blank_text'] = True
25737  *     parser = etree.XMLParser(**kw)             # <<<<<<<<<<<<<<
25738  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
25739  *     return parser
25740  */
25741   __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)
25742   __Pyx_GOTREF(__pyx_t_3);
25743   __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)
25744   __Pyx_GOTREF(__pyx_t_4);
25745   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25746   __pyx_v_parser = __pyx_t_4;
25747   __pyx_t_4 = 0;
25748
25749   /* "lxml/objectify.pyx":1780
25750  *         kw['remove_blank_text'] = True
25751  *     parser = etree.XMLParser(**kw)
25752  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<<
25753  *     return parser
25754  * 
25755  */
25756   __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)
25757   __Pyx_GOTREF(__pyx_t_3);
25758   __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1780, __pyx_L1_error)
25759   __Pyx_GOTREF(__pyx_t_5);
25760   __pyx_t_6 = NULL;
25761   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
25762     __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
25763     if (likely(__pyx_t_6)) {
25764       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25765       __Pyx_INCREF(__pyx_t_6);
25766       __Pyx_INCREF(function);
25767       __Pyx_DECREF_SET(__pyx_t_3, function);
25768     }
25769   }
25770   __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);
25771   __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
25772   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25773   if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1780, __pyx_L1_error)
25774   __Pyx_GOTREF(__pyx_t_4);
25775   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25776   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25777
25778   /* "lxml/objectify.pyx":1781
25779  *     parser = etree.XMLParser(**kw)
25780  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
25781  *     return parser             # <<<<<<<<<<<<<<
25782  * 
25783  * cdef _Element _makeElement(tag, text, attrib, nsmap):
25784  */
25785   __Pyx_XDECREF(__pyx_r);
25786   __Pyx_INCREF(__pyx_v_parser);
25787   __pyx_r = __pyx_v_parser;
25788   goto __pyx_L0;
25789
25790   /* "lxml/objectify.pyx":1767
25791  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
25792  * 
25793  * def makeparser(**kw):             # <<<<<<<<<<<<<<
25794  *     u"""makeparser(remove_blank_text=True, **kw)
25795  * 
25796  */
25797
25798   /* function exit code */
25799   __pyx_L1_error:;
25800   __Pyx_XDECREF(__pyx_t_3);
25801   __Pyx_XDECREF(__pyx_t_4);
25802   __Pyx_XDECREF(__pyx_t_5);
25803   __Pyx_XDECREF(__pyx_t_6);
25804   __Pyx_AddTraceback("lxml.objectify.makeparser", __pyx_clineno, __pyx_lineno, __pyx_filename);
25805   __pyx_r = NULL;
25806   __pyx_L0:;
25807   __Pyx_XDECREF(__pyx_v_parser);
25808   __Pyx_XGIVEREF(__pyx_r);
25809   __Pyx_RefNannyFinishContext();
25810   return __pyx_r;
25811 }
25812
25813 /* "lxml/objectify.pyx":1783
25814  *     return parser
25815  * 
25816  * cdef _Element _makeElement(tag, text, attrib, nsmap):             # <<<<<<<<<<<<<<
25817  *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)
25818  * 
25819  */
25820
25821 static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *__pyx_v_tag, PyObject *__pyx_v_text, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) {
25822   struct LxmlElement *__pyx_r = NULL;
25823   __Pyx_RefNannyDeclarations
25824   PyObject *__pyx_t_1 = NULL;
25825   PyObject *__pyx_t_2 = NULL;
25826   int __pyx_lineno = 0;
25827   const char *__pyx_filename = NULL;
25828   int __pyx_clineno = 0;
25829   __Pyx_RefNannySetupContext("_makeElement", 0);
25830
25831   /* "lxml/objectify.pyx":1784
25832  * 
25833  * cdef _Element _makeElement(tag, text, attrib, nsmap):
25834  *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)             # <<<<<<<<<<<<<<
25835  * 
25836  * ################################################################################
25837  */
25838   __Pyx_XDECREF(((PyObject *)__pyx_r));
25839   __pyx_t_1 = __pyx_v_4lxml_9objectify_objectify_parser;
25840   __Pyx_INCREF(__pyx_t_1);
25841   __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)
25842   __Pyx_GOTREF(__pyx_t_2);
25843   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25844   __pyx_r = ((struct LxmlElement *)__pyx_t_2);
25845   __pyx_t_2 = 0;
25846   goto __pyx_L0;
25847
25848   /* "lxml/objectify.pyx":1783
25849  *     return parser
25850  * 
25851  * cdef _Element _makeElement(tag, text, attrib, nsmap):             # <<<<<<<<<<<<<<
25852  *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)
25853  * 
25854  */
25855
25856   /* function exit code */
25857   __pyx_L1_error:;
25858   __Pyx_XDECREF(__pyx_t_1);
25859   __Pyx_XDECREF(__pyx_t_2);
25860   __Pyx_AddTraceback("lxml.objectify._makeElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
25861   __pyx_r = 0;
25862   __pyx_L0:;
25863   __Pyx_XGIVEREF((PyObject *)__pyx_r);
25864   __Pyx_RefNannyFinishContext();
25865   return __pyx_r;
25866 }
25867
25868 /* "lxml/objectify.pyx":1794
25869  * SubElement = etree.SubElement
25870  * 
25871  * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
25872  *     u"""fromstring(xml, parser=None, base_url=None)
25873  * 
25874  */
25875
25876 /* Python wrapper */
25877 static PyObject *__pyx_pw_4lxml_9objectify_33fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25878 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    ";
25879 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};
25880 static PyObject *__pyx_pw_4lxml_9objectify_33fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25881   PyObject *__pyx_v_xml = 0;
25882   PyObject *__pyx_v_parser = 0;
25883   PyObject *__pyx_v_base_url = 0;
25884   int __pyx_lineno = 0;
25885   const char *__pyx_filename = NULL;
25886   int __pyx_clineno = 0;
25887   PyObject *__pyx_r = 0;
25888   __Pyx_RefNannyDeclarations
25889   __Pyx_RefNannySetupContext("fromstring (wrapper)", 0);
25890   {
25891     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xml,&__pyx_n_s_parser,&__pyx_n_s_base_url,0};
25892     PyObject* values[3] = {0,0,0};
25893     values[1] = ((PyObject *)((PyObject *)Py_None));
25894     values[2] = ((PyObject *)((PyObject *)Py_None));
25895     if (unlikely(__pyx_kwds)) {
25896       Py_ssize_t kw_args;
25897       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25898       switch (pos_args) {
25899         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25900         CYTHON_FALLTHROUGH;
25901         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25902         CYTHON_FALLTHROUGH;
25903         case  0: break;
25904         default: goto __pyx_L5_argtuple_error;
25905       }
25906       kw_args = PyDict_Size(__pyx_kwds);
25907       switch (pos_args) {
25908         case  0:
25909         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xml)) != 0)) kw_args--;
25910         else goto __pyx_L5_argtuple_error;
25911         CYTHON_FALLTHROUGH;
25912         case  1:
25913         if (kw_args > 0) {
25914           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parser);
25915           if (value) { values[1] = value; kw_args--; }
25916         }
25917       }
25918       if (kw_args == 1) {
25919         const Py_ssize_t index = 2;
25920         PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
25921         if (value) { values[index] = value; kw_args--; }
25922       }
25923       if (unlikely(kw_args > 0)) {
25924         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstring") < 0)) __PYX_ERR(0, 1794, __pyx_L3_error)
25925       }
25926     } else {
25927       switch (PyTuple_GET_SIZE(__pyx_args)) {
25928         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25929         CYTHON_FALLTHROUGH;
25930         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25931         break;
25932         default: goto __pyx_L5_argtuple_error;
25933       }
25934     }
25935     __pyx_v_xml = values[0];
25936     __pyx_v_parser = values[1];
25937     __pyx_v_base_url = values[2];
25938   }
25939   goto __pyx_L4_argument_unpacking_done;
25940   __pyx_L5_argtuple_error:;
25941   __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1794, __pyx_L3_error)
25942   __pyx_L3_error:;
25943   __Pyx_AddTraceback("lxml.objectify.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
25944   __Pyx_RefNannyFinishContext();
25945   return NULL;
25946   __pyx_L4_argument_unpacking_done:;
25947   __pyx_r = __pyx_pf_4lxml_9objectify_32fromstring(__pyx_self, __pyx_v_xml, __pyx_v_parser, __pyx_v_base_url);
25948
25949   /* function exit code */
25950   __Pyx_RefNannyFinishContext();
25951   return __pyx_r;
25952 }
25953
25954 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) {
25955   PyObject *__pyx_r = NULL;
25956   __Pyx_RefNannyDeclarations
25957   int __pyx_t_1;
25958   int __pyx_t_2;
25959   PyObject *__pyx_t_3 = NULL;
25960   PyObject *__pyx_t_4 = NULL;
25961   PyObject *__pyx_t_5 = NULL;
25962   int __pyx_lineno = 0;
25963   const char *__pyx_filename = NULL;
25964   int __pyx_clineno = 0;
25965   __Pyx_RefNannySetupContext("fromstring", 0);
25966   __Pyx_INCREF(__pyx_v_parser);
25967
25968   /* "lxml/objectify.pyx":1806
25969  *     (DTD, XInclude, ...).
25970  *     """
25971  *     if parser is None:             # <<<<<<<<<<<<<<
25972  *         parser = objectify_parser
25973  *     return _fromstring(xml, parser, base_url=base_url)
25974  */
25975   __pyx_t_1 = (__pyx_v_parser == Py_None);
25976   __pyx_t_2 = (__pyx_t_1 != 0);
25977   if (__pyx_t_2) {
25978
25979     /* "lxml/objectify.pyx":1807
25980  *     """
25981  *     if parser is None:
25982  *         parser = objectify_parser             # <<<<<<<<<<<<<<
25983  *     return _fromstring(xml, parser, base_url=base_url)
25984  * 
25985  */
25986     __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
25987     __Pyx_DECREF_SET(__pyx_v_parser, __pyx_v_4lxml_9objectify_objectify_parser);
25988
25989     /* "lxml/objectify.pyx":1806
25990  *     (DTD, XInclude, ...).
25991  *     """
25992  *     if parser is None:             # <<<<<<<<<<<<<<
25993  *         parser = objectify_parser
25994  *     return _fromstring(xml, parser, base_url=base_url)
25995  */
25996   }
25997
25998   /* "lxml/objectify.pyx":1808
25999  *     if parser is None:
26000  *         parser = objectify_parser
26001  *     return _fromstring(xml, parser, base_url=base_url)             # <<<<<<<<<<<<<<
26002  * 
26003  * def XML(xml, parser=None, *, base_url=None):
26004  */
26005   __Pyx_XDECREF(__pyx_r);
26006   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
26007   __Pyx_GOTREF(__pyx_t_3);
26008   __Pyx_INCREF(__pyx_v_xml);
26009   __Pyx_GIVEREF(__pyx_v_xml);
26010   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xml);
26011   __Pyx_INCREF(__pyx_v_parser);
26012   __Pyx_GIVEREF(__pyx_v_parser);
26013   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser);
26014   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1808, __pyx_L1_error)
26015   __Pyx_GOTREF(__pyx_t_4);
26016   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1808, __pyx_L1_error)
26017   __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)
26018   __Pyx_GOTREF(__pyx_t_5);
26019   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26020   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26021   __pyx_r = __pyx_t_5;
26022   __pyx_t_5 = 0;
26023   goto __pyx_L0;
26024
26025   /* "lxml/objectify.pyx":1794
26026  * SubElement = etree.SubElement
26027  * 
26028  * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26029  *     u"""fromstring(xml, parser=None, base_url=None)
26030  * 
26031  */
26032
26033   /* function exit code */
26034   __pyx_L1_error:;
26035   __Pyx_XDECREF(__pyx_t_3);
26036   __Pyx_XDECREF(__pyx_t_4);
26037   __Pyx_XDECREF(__pyx_t_5);
26038   __Pyx_AddTraceback("lxml.objectify.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
26039   __pyx_r = NULL;
26040   __pyx_L0:;
26041   __Pyx_XDECREF(__pyx_v_parser);
26042   __Pyx_XGIVEREF(__pyx_r);
26043   __Pyx_RefNannyFinishContext();
26044   return __pyx_r;
26045 }
26046
26047 /* "lxml/objectify.pyx":1810
26048  *     return _fromstring(xml, parser, base_url=base_url)
26049  * 
26050  * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26051  *     u"""XML(xml, parser=None, base_url=None)
26052  * 
26053  */
26054
26055 /* Python wrapper */
26056 static PyObject *__pyx_pw_4lxml_9objectify_35XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26057 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    ";
26058 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};
26059 static PyObject *__pyx_pw_4lxml_9objectify_35XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26060   PyObject *__pyx_v_xml = 0;
26061   PyObject *__pyx_v_parser = 0;
26062   PyObject *__pyx_v_base_url = 0;
26063   int __pyx_lineno = 0;
26064   const char *__pyx_filename = NULL;
26065   int __pyx_clineno = 0;
26066   PyObject *__pyx_r = 0;
26067   __Pyx_RefNannyDeclarations
26068   __Pyx_RefNannySetupContext("XML (wrapper)", 0);
26069   {
26070     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xml,&__pyx_n_s_parser,&__pyx_n_s_base_url,0};
26071     PyObject* values[3] = {0,0,0};
26072     values[1] = ((PyObject *)((PyObject *)Py_None));
26073     values[2] = ((PyObject *)((PyObject *)Py_None));
26074     if (unlikely(__pyx_kwds)) {
26075       Py_ssize_t kw_args;
26076       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26077       switch (pos_args) {
26078         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26079         CYTHON_FALLTHROUGH;
26080         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26081         CYTHON_FALLTHROUGH;
26082         case  0: break;
26083         default: goto __pyx_L5_argtuple_error;
26084       }
26085       kw_args = PyDict_Size(__pyx_kwds);
26086       switch (pos_args) {
26087         case  0:
26088         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xml)) != 0)) kw_args--;
26089         else goto __pyx_L5_argtuple_error;
26090         CYTHON_FALLTHROUGH;
26091         case  1:
26092         if (kw_args > 0) {
26093           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parser);
26094           if (value) { values[1] = value; kw_args--; }
26095         }
26096       }
26097       if (kw_args == 1) {
26098         const Py_ssize_t index = 2;
26099         PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
26100         if (value) { values[index] = value; kw_args--; }
26101       }
26102       if (unlikely(kw_args > 0)) {
26103         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XML") < 0)) __PYX_ERR(0, 1810, __pyx_L3_error)
26104       }
26105     } else {
26106       switch (PyTuple_GET_SIZE(__pyx_args)) {
26107         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26108         CYTHON_FALLTHROUGH;
26109         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26110         break;
26111         default: goto __pyx_L5_argtuple_error;
26112       }
26113     }
26114     __pyx_v_xml = values[0];
26115     __pyx_v_parser = values[1];
26116     __pyx_v_base_url = values[2];
26117   }
26118   goto __pyx_L4_argument_unpacking_done;
26119   __pyx_L5_argtuple_error:;
26120   __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1810, __pyx_L3_error)
26121   __pyx_L3_error:;
26122   __Pyx_AddTraceback("lxml.objectify.XML", __pyx_clineno, __pyx_lineno, __pyx_filename);
26123   __Pyx_RefNannyFinishContext();
26124   return NULL;
26125   __pyx_L4_argument_unpacking_done:;
26126   __pyx_r = __pyx_pf_4lxml_9objectify_34XML(__pyx_self, __pyx_v_xml, __pyx_v_parser, __pyx_v_base_url);
26127
26128   /* function exit code */
26129   __Pyx_RefNannyFinishContext();
26130   return __pyx_r;
26131 }
26132
26133 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) {
26134   PyObject *__pyx_r = NULL;
26135   __Pyx_RefNannyDeclarations
26136   int __pyx_t_1;
26137   int __pyx_t_2;
26138   PyObject *__pyx_t_3 = NULL;
26139   PyObject *__pyx_t_4 = NULL;
26140   PyObject *__pyx_t_5 = NULL;
26141   int __pyx_lineno = 0;
26142   const char *__pyx_filename = NULL;
26143   int __pyx_clineno = 0;
26144   __Pyx_RefNannySetupContext("XML", 0);
26145   __Pyx_INCREF(__pyx_v_parser);
26146
26147   /* "lxml/objectify.pyx":1822
26148  *     (DTD, XInclude, ...).
26149  *     """
26150  *     if parser is None:             # <<<<<<<<<<<<<<
26151  *         parser = objectify_parser
26152  *     return _fromstring(xml, parser, base_url=base_url)
26153  */
26154   __pyx_t_1 = (__pyx_v_parser == Py_None);
26155   __pyx_t_2 = (__pyx_t_1 != 0);
26156   if (__pyx_t_2) {
26157
26158     /* "lxml/objectify.pyx":1823
26159  *     """
26160  *     if parser is None:
26161  *         parser = objectify_parser             # <<<<<<<<<<<<<<
26162  *     return _fromstring(xml, parser, base_url=base_url)
26163  * 
26164  */
26165     __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
26166     __Pyx_DECREF_SET(__pyx_v_parser, __pyx_v_4lxml_9objectify_objectify_parser);
26167
26168     /* "lxml/objectify.pyx":1822
26169  *     (DTD, XInclude, ...).
26170  *     """
26171  *     if parser is None:             # <<<<<<<<<<<<<<
26172  *         parser = objectify_parser
26173  *     return _fromstring(xml, parser, base_url=base_url)
26174  */
26175   }
26176
26177   /* "lxml/objectify.pyx":1824
26178  *     if parser is None:
26179  *         parser = objectify_parser
26180  *     return _fromstring(xml, parser, base_url=base_url)             # <<<<<<<<<<<<<<
26181  * 
26182  * cdef object _parse
26183  */
26184   __Pyx_XDECREF(__pyx_r);
26185   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1824, __pyx_L1_error)
26186   __Pyx_GOTREF(__pyx_t_3);
26187   __Pyx_INCREF(__pyx_v_xml);
26188   __Pyx_GIVEREF(__pyx_v_xml);
26189   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xml);
26190   __Pyx_INCREF(__pyx_v_parser);
26191   __Pyx_GIVEREF(__pyx_v_parser);
26192   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser);
26193   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1824, __pyx_L1_error)
26194   __Pyx_GOTREF(__pyx_t_4);
26195   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1824, __pyx_L1_error)
26196   __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)
26197   __Pyx_GOTREF(__pyx_t_5);
26198   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26199   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26200   __pyx_r = __pyx_t_5;
26201   __pyx_t_5 = 0;
26202   goto __pyx_L0;
26203
26204   /* "lxml/objectify.pyx":1810
26205  *     return _fromstring(xml, parser, base_url=base_url)
26206  * 
26207  * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26208  *     u"""XML(xml, parser=None, base_url=None)
26209  * 
26210  */
26211
26212   /* function exit code */
26213   __pyx_L1_error:;
26214   __Pyx_XDECREF(__pyx_t_3);
26215   __Pyx_XDECREF(__pyx_t_4);
26216   __Pyx_XDECREF(__pyx_t_5);
26217   __Pyx_AddTraceback("lxml.objectify.XML", __pyx_clineno, __pyx_lineno, __pyx_filename);
26218   __pyx_r = NULL;
26219   __pyx_L0:;
26220   __Pyx_XDECREF(__pyx_v_parser);
26221   __Pyx_XGIVEREF(__pyx_r);
26222   __Pyx_RefNannyFinishContext();
26223   return __pyx_r;
26224 }
26225
26226 /* "lxml/objectify.pyx":1829
26227  * _parse = etree.parse
26228  * 
26229  * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26230  *     u"""parse(f, parser=None, base_url=None)
26231  * 
26232  */
26233
26234 /* Python wrapper */
26235 static PyObject *__pyx_pw_4lxml_9objectify_37parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26236 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    ";
26237 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};
26238 static PyObject *__pyx_pw_4lxml_9objectify_37parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26239   PyObject *__pyx_v_f = 0;
26240   PyObject *__pyx_v_parser = 0;
26241   PyObject *__pyx_v_base_url = 0;
26242   int __pyx_lineno = 0;
26243   const char *__pyx_filename = NULL;
26244   int __pyx_clineno = 0;
26245   PyObject *__pyx_r = 0;
26246   __Pyx_RefNannyDeclarations
26247   __Pyx_RefNannySetupContext("parse (wrapper)", 0);
26248   {
26249     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f,&__pyx_n_s_parser,&__pyx_n_s_base_url,0};
26250     PyObject* values[3] = {0,0,0};
26251     values[1] = ((PyObject *)((PyObject *)Py_None));
26252     values[2] = ((PyObject *)((PyObject *)Py_None));
26253     if (unlikely(__pyx_kwds)) {
26254       Py_ssize_t kw_args;
26255       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26256       switch (pos_args) {
26257         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26258         CYTHON_FALLTHROUGH;
26259         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26260         CYTHON_FALLTHROUGH;
26261         case  0: break;
26262         default: goto __pyx_L5_argtuple_error;
26263       }
26264       kw_args = PyDict_Size(__pyx_kwds);
26265       switch (pos_args) {
26266         case  0:
26267         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
26268         else goto __pyx_L5_argtuple_error;
26269         CYTHON_FALLTHROUGH;
26270         case  1:
26271         if (kw_args > 0) {
26272           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parser);
26273           if (value) { values[1] = value; kw_args--; }
26274         }
26275       }
26276       if (kw_args == 1) {
26277         const Py_ssize_t index = 2;
26278         PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
26279         if (value) { values[index] = value; kw_args--; }
26280       }
26281       if (unlikely(kw_args > 0)) {
26282         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 1829, __pyx_L3_error)
26283       }
26284     } else {
26285       switch (PyTuple_GET_SIZE(__pyx_args)) {
26286         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26287         CYTHON_FALLTHROUGH;
26288         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26289         break;
26290         default: goto __pyx_L5_argtuple_error;
26291       }
26292     }
26293     __pyx_v_f = values[0];
26294     __pyx_v_parser = values[1];
26295     __pyx_v_base_url = values[2];
26296   }
26297   goto __pyx_L4_argument_unpacking_done;
26298   __pyx_L5_argtuple_error:;
26299   __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1829, __pyx_L3_error)
26300   __pyx_L3_error:;
26301   __Pyx_AddTraceback("lxml.objectify.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
26302   __Pyx_RefNannyFinishContext();
26303   return NULL;
26304   __pyx_L4_argument_unpacking_done:;
26305   __pyx_r = __pyx_pf_4lxml_9objectify_36parse(__pyx_self, __pyx_v_f, __pyx_v_parser, __pyx_v_base_url);
26306
26307   /* function exit code */
26308   __Pyx_RefNannyFinishContext();
26309   return __pyx_r;
26310 }
26311
26312 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) {
26313   PyObject *__pyx_r = NULL;
26314   __Pyx_RefNannyDeclarations
26315   int __pyx_t_1;
26316   int __pyx_t_2;
26317   PyObject *__pyx_t_3 = NULL;
26318   PyObject *__pyx_t_4 = NULL;
26319   PyObject *__pyx_t_5 = NULL;
26320   int __pyx_lineno = 0;
26321   const char *__pyx_filename = NULL;
26322   int __pyx_clineno = 0;
26323   __Pyx_RefNannySetupContext("parse", 0);
26324   __Pyx_INCREF(__pyx_v_parser);
26325
26326   /* "lxml/objectify.pyx":1840
26327  *     up external entities (DTD, XInclude, ...) with relative paths.
26328  *     """
26329  *     if parser is None:             # <<<<<<<<<<<<<<
26330  *         parser = objectify_parser
26331  *     return _parse(f, parser, base_url=base_url)
26332  */
26333   __pyx_t_1 = (__pyx_v_parser == Py_None);
26334   __pyx_t_2 = (__pyx_t_1 != 0);
26335   if (__pyx_t_2) {
26336
26337     /* "lxml/objectify.pyx":1841
26338  *     """
26339  *     if parser is None:
26340  *         parser = objectify_parser             # <<<<<<<<<<<<<<
26341  *     return _parse(f, parser, base_url=base_url)
26342  * 
26343  */
26344     __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
26345     __Pyx_DECREF_SET(__pyx_v_parser, __pyx_v_4lxml_9objectify_objectify_parser);
26346
26347     /* "lxml/objectify.pyx":1840
26348  *     up external entities (DTD, XInclude, ...) with relative paths.
26349  *     """
26350  *     if parser is None:             # <<<<<<<<<<<<<<
26351  *         parser = objectify_parser
26352  *     return _parse(f, parser, base_url=base_url)
26353  */
26354   }
26355
26356   /* "lxml/objectify.pyx":1842
26357  *     if parser is None:
26358  *         parser = objectify_parser
26359  *     return _parse(f, parser, base_url=base_url)             # <<<<<<<<<<<<<<
26360  * 
26361  * cdef dict _DEFAULT_NSMAP = {
26362  */
26363   __Pyx_XDECREF(__pyx_r);
26364   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1842, __pyx_L1_error)
26365   __Pyx_GOTREF(__pyx_t_3);
26366   __Pyx_INCREF(__pyx_v_f);
26367   __Pyx_GIVEREF(__pyx_v_f);
26368   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f);
26369   __Pyx_INCREF(__pyx_v_parser);
26370   __Pyx_GIVEREF(__pyx_v_parser);
26371   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser);
26372   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1842, __pyx_L1_error)
26373   __Pyx_GOTREF(__pyx_t_4);
26374   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)
26375   __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)
26376   __Pyx_GOTREF(__pyx_t_5);
26377   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26378   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26379   __pyx_r = __pyx_t_5;
26380   __pyx_t_5 = 0;
26381   goto __pyx_L0;
26382
26383   /* "lxml/objectify.pyx":1829
26384  * _parse = etree.parse
26385  * 
26386  * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26387  *     u"""parse(f, parser=None, base_url=None)
26388  * 
26389  */
26390
26391   /* function exit code */
26392   __pyx_L1_error:;
26393   __Pyx_XDECREF(__pyx_t_3);
26394   __Pyx_XDECREF(__pyx_t_4);
26395   __Pyx_XDECREF(__pyx_t_5);
26396   __Pyx_AddTraceback("lxml.objectify.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
26397   __pyx_r = NULL;
26398   __pyx_L0:;
26399   __Pyx_XDECREF(__pyx_v_parser);
26400   __Pyx_XGIVEREF(__pyx_r);
26401   __Pyx_RefNannyFinishContext();
26402   return __pyx_r;
26403 }
26404
26405 /* "lxml/objectify.pyx":1852
26406  * E = ElementMaker()
26407  * 
26408  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
26409  *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
26410  * 
26411  */
26412
26413 /* Python wrapper */
26414 static PyObject *__pyx_pw_4lxml_9objectify_39Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26415 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    ";
26416 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};
26417 static PyObject *__pyx_pw_4lxml_9objectify_39Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26418   PyObject *__pyx_v__tag = 0;
26419   PyObject *__pyx_v_attrib = 0;
26420   PyObject *__pyx_v_nsmap = 0;
26421   PyObject *__pyx_v__pytype = 0;
26422   PyObject *__pyx_v__attributes = 0;
26423   int __pyx_lineno = 0;
26424   const char *__pyx_filename = NULL;
26425   int __pyx_clineno = 0;
26426   PyObject *__pyx_r = 0;
26427   __Pyx_RefNannyDeclarations
26428   __Pyx_RefNannySetupContext("Element (wrapper)", 0);
26429   __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
26430   __Pyx_GOTREF(__pyx_v__attributes);
26431   {
26432     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag_2,&__pyx_n_s_attrib,&__pyx_n_s_nsmap,&__pyx_n_s_pytype_2,0};
26433     PyObject* values[4] = {0,0,0,0};
26434     values[1] = ((PyObject *)((PyObject *)Py_None));
26435     values[2] = ((PyObject *)((PyObject *)Py_None));
26436     values[3] = ((PyObject *)((PyObject *)Py_None));
26437     if (unlikely(__pyx_kwds)) {
26438       Py_ssize_t kw_args;
26439       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26440       switch (pos_args) {
26441         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26442         CYTHON_FALLTHROUGH;
26443         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26444         CYTHON_FALLTHROUGH;
26445         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26446         CYTHON_FALLTHROUGH;
26447         case  0: break;
26448         default: goto __pyx_L5_argtuple_error;
26449       }
26450       kw_args = PyDict_Size(__pyx_kwds);
26451       switch (pos_args) {
26452         case  0:
26453         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag_2)) != 0)) kw_args--;
26454         else goto __pyx_L5_argtuple_error;
26455         CYTHON_FALLTHROUGH;
26456         case  1:
26457         if (kw_args > 0) {
26458           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib);
26459           if (value) { values[1] = value; kw_args--; }
26460         }
26461         CYTHON_FALLTHROUGH;
26462         case  2:
26463         if (kw_args > 0) {
26464           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nsmap);
26465           if (value) { values[2] = value; kw_args--; }
26466         }
26467       }
26468       if (kw_args == 1) {
26469         const Py_ssize_t index = 3;
26470         PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
26471         if (value) { values[index] = value; kw_args--; }
26472       }
26473       if (unlikely(kw_args > 0)) {
26474         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "Element") < 0)) __PYX_ERR(0, 1852, __pyx_L3_error)
26475       }
26476     } else {
26477       switch (PyTuple_GET_SIZE(__pyx_args)) {
26478         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26479         CYTHON_FALLTHROUGH;
26480         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26481         CYTHON_FALLTHROUGH;
26482         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26483         break;
26484         default: goto __pyx_L5_argtuple_error;
26485       }
26486     }
26487     __pyx_v__tag = values[0];
26488     __pyx_v_attrib = values[1];
26489     __pyx_v_nsmap = values[2];
26490     __pyx_v__pytype = values[3];
26491   }
26492   goto __pyx_L4_argument_unpacking_done;
26493   __pyx_L5_argtuple_error:;
26494   __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1852, __pyx_L3_error)
26495   __pyx_L3_error:;
26496   __Pyx_DECREF(__pyx_v__attributes); __pyx_v__attributes = 0;
26497   __Pyx_AddTraceback("lxml.objectify.Element", __pyx_clineno, __pyx_lineno, __pyx_filename);
26498   __Pyx_RefNannyFinishContext();
26499   return NULL;
26500   __pyx_L4_argument_unpacking_done:;
26501   __pyx_r = __pyx_pf_4lxml_9objectify_38Element(__pyx_self, __pyx_v__tag, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__pytype, __pyx_v__attributes);
26502
26503   /* function exit code */
26504   __Pyx_XDECREF(__pyx_v__attributes);
26505   __Pyx_RefNannyFinishContext();
26506   return __pyx_r;
26507 }
26508
26509 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) {
26510   PyObject *__pyx_r = NULL;
26511   __Pyx_RefNannyDeclarations
26512   int __pyx_t_1;
26513   int __pyx_t_2;
26514   PyObject *__pyx_t_3 = NULL;
26515   PyObject *__pyx_t_4 = NULL;
26516   PyObject *__pyx_t_5 = NULL;
26517   int __pyx_lineno = 0;
26518   const char *__pyx_filename = NULL;
26519   int __pyx_clineno = 0;
26520   __Pyx_RefNannySetupContext("Element", 0);
26521   __Pyx_INCREF(__pyx_v_attrib);
26522   __Pyx_INCREF(__pyx_v_nsmap);
26523   __Pyx_INCREF(__pyx_v__pytype);
26524   __Pyx_INCREF(__pyx_v__attributes);
26525
26526   /* "lxml/objectify.pyx":1860
26527  *     NOTE: requires parser based element class lookup activated in lxml.etree!
26528  *     """
26529  *     if attrib is not None:             # <<<<<<<<<<<<<<
26530  *         if _attributes:
26531  *             attrib = dict(attrib)
26532  */
26533   __pyx_t_1 = (__pyx_v_attrib != Py_None);
26534   __pyx_t_2 = (__pyx_t_1 != 0);
26535   if (__pyx_t_2) {
26536
26537     /* "lxml/objectify.pyx":1861
26538  *     """
26539  *     if attrib is not None:
26540  *         if _attributes:             # <<<<<<<<<<<<<<
26541  *             attrib = dict(attrib)
26542  *             attrib.update(_attributes)
26543  */
26544     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1861, __pyx_L1_error)
26545     if (__pyx_t_2) {
26546
26547       /* "lxml/objectify.pyx":1862
26548  *     if attrib is not None:
26549  *         if _attributes:
26550  *             attrib = dict(attrib)             # <<<<<<<<<<<<<<
26551  *             attrib.update(_attributes)
26552  *         _attributes = attrib
26553  */
26554       __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_attrib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
26555       __Pyx_GOTREF(__pyx_t_3);
26556       __Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_3);
26557       __pyx_t_3 = 0;
26558
26559       /* "lxml/objectify.pyx":1863
26560  *         if _attributes:
26561  *             attrib = dict(attrib)
26562  *             attrib.update(_attributes)             # <<<<<<<<<<<<<<
26563  *         _attributes = attrib
26564  *     if _pytype is None:
26565  */
26566       __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)
26567       __Pyx_GOTREF(__pyx_t_4);
26568       __pyx_t_5 = NULL;
26569       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
26570         __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
26571         if (likely(__pyx_t_5)) {
26572           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
26573           __Pyx_INCREF(__pyx_t_5);
26574           __Pyx_INCREF(function);
26575           __Pyx_DECREF_SET(__pyx_t_4, function);
26576         }
26577       }
26578       __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);
26579       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
26580       if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L1_error)
26581       __Pyx_GOTREF(__pyx_t_3);
26582       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26583       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26584
26585       /* "lxml/objectify.pyx":1861
26586  *     """
26587  *     if attrib is not None:
26588  *         if _attributes:             # <<<<<<<<<<<<<<
26589  *             attrib = dict(attrib)
26590  *             attrib.update(_attributes)
26591  */
26592     }
26593
26594     /* "lxml/objectify.pyx":1864
26595  *             attrib = dict(attrib)
26596  *             attrib.update(_attributes)
26597  *         _attributes = attrib             # <<<<<<<<<<<<<<
26598  *     if _pytype is None:
26599  *         _pytype = TREE_PYTYPE_NAME
26600  */
26601     __Pyx_INCREF(__pyx_v_attrib);
26602     __Pyx_DECREF_SET(__pyx_v__attributes, __pyx_v_attrib);
26603
26604     /* "lxml/objectify.pyx":1860
26605  *     NOTE: requires parser based element class lookup activated in lxml.etree!
26606  *     """
26607  *     if attrib is not None:             # <<<<<<<<<<<<<<
26608  *         if _attributes:
26609  *             attrib = dict(attrib)
26610  */
26611   }
26612
26613   /* "lxml/objectify.pyx":1865
26614  *             attrib.update(_attributes)
26615  *         _attributes = attrib
26616  *     if _pytype is None:             # <<<<<<<<<<<<<<
26617  *         _pytype = TREE_PYTYPE_NAME
26618  *     if nsmap is None:
26619  */
26620   __pyx_t_2 = (__pyx_v__pytype == Py_None);
26621   __pyx_t_1 = (__pyx_t_2 != 0);
26622   if (__pyx_t_1) {
26623
26624     /* "lxml/objectify.pyx":1866
26625  *         _attributes = attrib
26626  *     if _pytype is None:
26627  *         _pytype = TREE_PYTYPE_NAME             # <<<<<<<<<<<<<<
26628  *     if nsmap is None:
26629  *         nsmap = _DEFAULT_NSMAP
26630  */
26631     __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
26632     __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
26633
26634     /* "lxml/objectify.pyx":1865
26635  *             attrib.update(_attributes)
26636  *         _attributes = attrib
26637  *     if _pytype is None:             # <<<<<<<<<<<<<<
26638  *         _pytype = TREE_PYTYPE_NAME
26639  *     if nsmap is None:
26640  */
26641   }
26642
26643   /* "lxml/objectify.pyx":1867
26644  *     if _pytype is None:
26645  *         _pytype = TREE_PYTYPE_NAME
26646  *     if nsmap is None:             # <<<<<<<<<<<<<<
26647  *         nsmap = _DEFAULT_NSMAP
26648  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
26649  */
26650   __pyx_t_1 = (__pyx_v_nsmap == Py_None);
26651   __pyx_t_2 = (__pyx_t_1 != 0);
26652   if (__pyx_t_2) {
26653
26654     /* "lxml/objectify.pyx":1868
26655  *         _pytype = TREE_PYTYPE_NAME
26656  *     if nsmap is None:
26657  *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
26658  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
26659  *     return _makeElement(_tag, None, _attributes, nsmap)
26660  */
26661     __Pyx_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
26662     __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
26663
26664     /* "lxml/objectify.pyx":1867
26665  *     if _pytype is None:
26666  *         _pytype = TREE_PYTYPE_NAME
26667  *     if nsmap is None:             # <<<<<<<<<<<<<<
26668  *         nsmap = _DEFAULT_NSMAP
26669  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
26670  */
26671   }
26672
26673   /* "lxml/objectify.pyx":1869
26674  *     if nsmap is None:
26675  *         nsmap = _DEFAULT_NSMAP
26676  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
26677  *     return _makeElement(_tag, None, _attributes, nsmap)
26678  * 
26679  */
26680   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1869, __pyx_L1_error)
26681   __Pyx_GOTREF(__pyx_t_3);
26682   if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_t_3, __pyx_v__pytype) < 0)) __PYX_ERR(0, 1869, __pyx_L1_error)
26683   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26684
26685   /* "lxml/objectify.pyx":1870
26686  *         nsmap = _DEFAULT_NSMAP
26687  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
26688  *     return _makeElement(_tag, None, _attributes, nsmap)             # <<<<<<<<<<<<<<
26689  * 
26690  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,
26691  */
26692   __Pyx_XDECREF(__pyx_r);
26693   __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)
26694   __Pyx_GOTREF(__pyx_t_3);
26695   __pyx_r = __pyx_t_3;
26696   __pyx_t_3 = 0;
26697   goto __pyx_L0;
26698
26699   /* "lxml/objectify.pyx":1852
26700  * E = ElementMaker()
26701  * 
26702  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
26703  *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
26704  * 
26705  */
26706
26707   /* function exit code */
26708   __pyx_L1_error:;
26709   __Pyx_XDECREF(__pyx_t_3);
26710   __Pyx_XDECREF(__pyx_t_4);
26711   __Pyx_XDECREF(__pyx_t_5);
26712   __Pyx_AddTraceback("lxml.objectify.Element", __pyx_clineno, __pyx_lineno, __pyx_filename);
26713   __pyx_r = NULL;
26714   __pyx_L0:;
26715   __Pyx_XDECREF(__pyx_v__attributes);
26716   __Pyx_XDECREF(__pyx_v_attrib);
26717   __Pyx_XDECREF(__pyx_v_nsmap);
26718   __Pyx_XDECREF(__pyx_v__pytype);
26719   __Pyx_XGIVEREF(__pyx_r);
26720   __Pyx_RefNannyFinishContext();
26721   return __pyx_r;
26722 }
26723
26724 /* "lxml/objectify.pyx":1872
26725  *     return _makeElement(_tag, None, _attributes, nsmap)
26726  * 
26727  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
26728  *                 **_attributes):
26729  *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
26730  */
26731
26732 /* Python wrapper */
26733 static PyObject *__pyx_pw_4lxml_9objectify_41DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26734 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    ";
26735 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};
26736 static PyObject *__pyx_pw_4lxml_9objectify_41DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26737   PyObject *__pyx_v__value = 0;
26738   PyObject *__pyx_v_attrib = 0;
26739   PyObject *__pyx_v_nsmap = 0;
26740   PyObject *__pyx_v__pytype = 0;
26741   PyObject *__pyx_v__xsi = 0;
26742   PyObject *__pyx_v__attributes = 0;
26743   int __pyx_lineno = 0;
26744   const char *__pyx_filename = NULL;
26745   int __pyx_clineno = 0;
26746   PyObject *__pyx_r = 0;
26747   __Pyx_RefNannyDeclarations
26748   __Pyx_RefNannySetupContext("DataElement (wrapper)", 0);
26749   __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
26750   __Pyx_GOTREF(__pyx_v__attributes);
26751   {
26752     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};
26753     PyObject* values[5] = {0,0,0,0,0};
26754     values[1] = ((PyObject *)((PyObject *)Py_None));
26755     values[2] = ((PyObject *)((PyObject *)Py_None));
26756     values[3] = ((PyObject *)((PyObject *)Py_None));
26757     values[4] = ((PyObject *)((PyObject *)Py_None));
26758     if (unlikely(__pyx_kwds)) {
26759       Py_ssize_t kw_args;
26760       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26761       switch (pos_args) {
26762         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26763         CYTHON_FALLTHROUGH;
26764         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26765         CYTHON_FALLTHROUGH;
26766         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26767         CYTHON_FALLTHROUGH;
26768         case  0: break;
26769         default: goto __pyx_L5_argtuple_error;
26770       }
26771       kw_args = PyDict_Size(__pyx_kwds);
26772       switch (pos_args) {
26773         case  0:
26774         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_2)) != 0)) kw_args--;
26775         else goto __pyx_L5_argtuple_error;
26776         CYTHON_FALLTHROUGH;
26777         case  1:
26778         if (kw_args > 0) {
26779           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib);
26780           if (value) { values[1] = value; kw_args--; }
26781         }
26782         CYTHON_FALLTHROUGH;
26783         case  2:
26784         if (kw_args > 0) {
26785           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nsmap);
26786           if (value) { values[2] = value; kw_args--; }
26787         }
26788       }
26789       if (kw_args > 0 && (kw_args <= 2)) {
26790         Py_ssize_t index;
26791         for (index = 3; index < 5 && kw_args > 0; index++) {
26792           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
26793           if (value) { values[index] = value; kw_args--; }
26794         }
26795       }
26796       if (unlikely(kw_args > 0)) {
26797         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "DataElement") < 0)) __PYX_ERR(0, 1872, __pyx_L3_error)
26798       }
26799     } else {
26800       switch (PyTuple_GET_SIZE(__pyx_args)) {
26801         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26802         CYTHON_FALLTHROUGH;
26803         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26804         CYTHON_FALLTHROUGH;
26805         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26806         break;
26807         default: goto __pyx_L5_argtuple_error;
26808       }
26809     }
26810     __pyx_v__value = values[0];
26811     __pyx_v_attrib = values[1];
26812     __pyx_v_nsmap = values[2];
26813     __pyx_v__pytype = values[3];
26814     __pyx_v__xsi = values[4];
26815   }
26816   goto __pyx_L4_argument_unpacking_done;
26817   __pyx_L5_argtuple_error:;
26818   __Pyx_RaiseArgtupleInvalid("DataElement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1872, __pyx_L3_error)
26819   __pyx_L3_error:;
26820   __Pyx_DECREF(__pyx_v__attributes); __pyx_v__attributes = 0;
26821   __Pyx_AddTraceback("lxml.objectify.DataElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
26822   __Pyx_RefNannyFinishContext();
26823   return NULL;
26824   __pyx_L4_argument_unpacking_done:;
26825   __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);
26826
26827   /* function exit code */
26828   __Pyx_XDECREF(__pyx_v__attributes);
26829   __Pyx_RefNannyFinishContext();
26830   return __pyx_r;
26831 }
26832
26833 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) {
26834   PyObject *__pyx_v_temp = NULL;
26835   PyObject *__pyx_v_prefix = NULL;
26836   PyObject *__pyx_v_name = NULL;
26837   PyObject *__pyx_v_ns = NULL;
26838   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_py_type = NULL;
26839   PyObject *__pyx_v_strval = NULL;
26840   PyObject *__pyx_v_stringify = NULL;
26841   PyObject *__pyx_r = NULL;
26842   __Pyx_RefNannyDeclarations
26843   int __pyx_t_1;
26844   int __pyx_t_2;
26845   int __pyx_t_3;
26846   PyObject *__pyx_t_4 = NULL;
26847   PyObject *__pyx_t_5 = NULL;
26848   PyObject *__pyx_t_6 = NULL;
26849   PyObject *__pyx_t_7 = NULL;
26850   PyObject *(*__pyx_t_8)(PyObject *);
26851   Py_ssize_t __pyx_t_9;
26852   PyObject *(*__pyx_t_10)(PyObject *);
26853   PyObject *__pyx_t_11 = NULL;
26854   int __pyx_lineno = 0;
26855   const char *__pyx_filename = NULL;
26856   int __pyx_clineno = 0;
26857   __Pyx_RefNannySetupContext("DataElement", 0);
26858   __Pyx_INCREF(__pyx_v_attrib);
26859   __Pyx_INCREF(__pyx_v_nsmap);
26860   __Pyx_INCREF(__pyx_v__pytype);
26861   __Pyx_INCREF(__pyx_v__xsi);
26862   __Pyx_INCREF(__pyx_v__attributes);
26863
26864   /* "lxml/objectify.pyx":1887
26865  *     in attrib and/or keyword arguments.
26866  *     """
26867  *     if nsmap is None:             # <<<<<<<<<<<<<<
26868  *         nsmap = _DEFAULT_NSMAP
26869  *     if attrib is not None and attrib:
26870  */
26871   __pyx_t_1 = (__pyx_v_nsmap == Py_None);
26872   __pyx_t_2 = (__pyx_t_1 != 0);
26873   if (__pyx_t_2) {
26874
26875     /* "lxml/objectify.pyx":1888
26876  *     """
26877  *     if nsmap is None:
26878  *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
26879  *     if attrib is not None and attrib:
26880  *         if _attributes:
26881  */
26882     __Pyx_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
26883     __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
26884
26885     /* "lxml/objectify.pyx":1887
26886  *     in attrib and/or keyword arguments.
26887  *     """
26888  *     if nsmap is None:             # <<<<<<<<<<<<<<
26889  *         nsmap = _DEFAULT_NSMAP
26890  *     if attrib is not None and attrib:
26891  */
26892   }
26893
26894   /* "lxml/objectify.pyx":1889
26895  *     if nsmap is None:
26896  *         nsmap = _DEFAULT_NSMAP
26897  *     if attrib is not None and attrib:             # <<<<<<<<<<<<<<
26898  *         if _attributes:
26899  *             attrib = dict(attrib)
26900  */
26901   __pyx_t_1 = (__pyx_v_attrib != Py_None);
26902   __pyx_t_3 = (__pyx_t_1 != 0);
26903   if (__pyx_t_3) {
26904   } else {
26905     __pyx_t_2 = __pyx_t_3;
26906     goto __pyx_L5_bool_binop_done;
26907   }
26908   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1889, __pyx_L1_error)
26909   __pyx_t_2 = __pyx_t_3;
26910   __pyx_L5_bool_binop_done:;
26911   if (__pyx_t_2) {
26912
26913     /* "lxml/objectify.pyx":1890
26914  *         nsmap = _DEFAULT_NSMAP
26915  *     if attrib is not None and attrib:
26916  *         if _attributes:             # <<<<<<<<<<<<<<
26917  *             attrib = dict(attrib)
26918  *             attrib.update(_attributes)
26919  */
26920     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1890, __pyx_L1_error)
26921     if (__pyx_t_2) {
26922
26923       /* "lxml/objectify.pyx":1891
26924  *     if attrib is not None and attrib:
26925  *         if _attributes:
26926  *             attrib = dict(attrib)             # <<<<<<<<<<<<<<
26927  *             attrib.update(_attributes)
26928  *         _attributes = attrib
26929  */
26930       __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1891, __pyx_L1_error)
26931       __Pyx_GOTREF(__pyx_t_4);
26932       __Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_4);
26933       __pyx_t_4 = 0;
26934
26935       /* "lxml/objectify.pyx":1892
26936  *         if _attributes:
26937  *             attrib = dict(attrib)
26938  *             attrib.update(_attributes)             # <<<<<<<<<<<<<<
26939  *         _attributes = attrib
26940  *     if isinstance(_value, ObjectifiedElement):
26941  */
26942       __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)
26943       __Pyx_GOTREF(__pyx_t_5);
26944       __pyx_t_6 = NULL;
26945       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
26946         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
26947         if (likely(__pyx_t_6)) {
26948           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
26949           __Pyx_INCREF(__pyx_t_6);
26950           __Pyx_INCREF(function);
26951           __Pyx_DECREF_SET(__pyx_t_5, function);
26952         }
26953       }
26954       __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);
26955       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
26956       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1892, __pyx_L1_error)
26957       __Pyx_GOTREF(__pyx_t_4);
26958       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
26959       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26960
26961       /* "lxml/objectify.pyx":1890
26962  *         nsmap = _DEFAULT_NSMAP
26963  *     if attrib is not None and attrib:
26964  *         if _attributes:             # <<<<<<<<<<<<<<
26965  *             attrib = dict(attrib)
26966  *             attrib.update(_attributes)
26967  */
26968     }
26969
26970     /* "lxml/objectify.pyx":1893
26971  *             attrib = dict(attrib)
26972  *             attrib.update(_attributes)
26973  *         _attributes = attrib             # <<<<<<<<<<<<<<
26974  *     if isinstance(_value, ObjectifiedElement):
26975  *         if _pytype is None:
26976  */
26977     __Pyx_INCREF(__pyx_v_attrib);
26978     __Pyx_DECREF_SET(__pyx_v__attributes, __pyx_v_attrib);
26979
26980     /* "lxml/objectify.pyx":1889
26981  *     if nsmap is None:
26982  *         nsmap = _DEFAULT_NSMAP
26983  *     if attrib is not None and attrib:             # <<<<<<<<<<<<<<
26984  *         if _attributes:
26985  *             attrib = dict(attrib)
26986  */
26987   }
26988
26989   /* "lxml/objectify.pyx":1894
26990  *             attrib.update(_attributes)
26991  *         _attributes = attrib
26992  *     if isinstance(_value, ObjectifiedElement):             # <<<<<<<<<<<<<<
26993  *         if _pytype is None:
26994  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
26995  */
26996   __pyx_t_2 = __Pyx_TypeCheck(__pyx_v__value, __pyx_ptype_4lxml_9objectify_ObjectifiedElement); 
26997   __pyx_t_3 = (__pyx_t_2 != 0);
26998   if (__pyx_t_3) {
26999
27000     /* "lxml/objectify.pyx":1895
27001  *         _attributes = attrib
27002  *     if isinstance(_value, ObjectifiedElement):
27003  *         if _pytype is None:             # <<<<<<<<<<<<<<
27004  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
27005  *                 # special case: no change!
27006  */
27007     __pyx_t_3 = (__pyx_v__pytype == Py_None);
27008     __pyx_t_2 = (__pyx_t_3 != 0);
27009     if (__pyx_t_2) {
27010
27011       /* "lxml/objectify.pyx":1896
27012  *     if isinstance(_value, ObjectifiedElement):
27013  *         if _pytype is None:
27014  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
27015  *                 # special case: no change!
27016  *                 return _value.__copy__()
27017  */
27018       __pyx_t_3 = (__pyx_v__xsi == Py_None);
27019       __pyx_t_1 = (__pyx_t_3 != 0);
27020       if (__pyx_t_1) {
27021       } else {
27022         __pyx_t_2 = __pyx_t_1;
27023         goto __pyx_L11_bool_binop_done;
27024       }
27025       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1896, __pyx_L1_error)
27026       __pyx_t_3 = ((!__pyx_t_1) != 0);
27027       if (__pyx_t_3) {
27028       } else {
27029         __pyx_t_2 = __pyx_t_3;
27030         goto __pyx_L11_bool_binop_done;
27031       }
27032       __pyx_t_3 = (__pyx_v_nsmap == __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
27033       __pyx_t_1 = (__pyx_t_3 != 0);
27034       __pyx_t_2 = __pyx_t_1;
27035       __pyx_L11_bool_binop_done:;
27036       if (__pyx_t_2) {
27037
27038         /* "lxml/objectify.pyx":1898
27039  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
27040  *                 # special case: no change!
27041  *                 return _value.__copy__()             # <<<<<<<<<<<<<<
27042  *     if isinstance(_value, ObjectifiedDataElement):
27043  *         # reuse existing nsmap unless redefined in nsmap parameter
27044  */
27045         __Pyx_XDECREF(__pyx_r);
27046         __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)
27047         __Pyx_GOTREF(__pyx_t_5);
27048         __pyx_t_6 = NULL;
27049         if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27050           __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
27051           if (likely(__pyx_t_6)) {
27052             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27053             __Pyx_INCREF(__pyx_t_6);
27054             __Pyx_INCREF(function);
27055             __Pyx_DECREF_SET(__pyx_t_5, function);
27056           }
27057         }
27058         __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
27059         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27060         if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1898, __pyx_L1_error)
27061         __Pyx_GOTREF(__pyx_t_4);
27062         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27063         __pyx_r = __pyx_t_4;
27064         __pyx_t_4 = 0;
27065         goto __pyx_L0;
27066
27067         /* "lxml/objectify.pyx":1896
27068  *     if isinstance(_value, ObjectifiedElement):
27069  *         if _pytype is None:
27070  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
27071  *                 # special case: no change!
27072  *                 return _value.__copy__()
27073  */
27074       }
27075
27076       /* "lxml/objectify.pyx":1895
27077  *         _attributes = attrib
27078  *     if isinstance(_value, ObjectifiedElement):
27079  *         if _pytype is None:             # <<<<<<<<<<<<<<
27080  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
27081  *                 # special case: no change!
27082  */
27083     }
27084
27085     /* "lxml/objectify.pyx":1894
27086  *             attrib.update(_attributes)
27087  *         _attributes = attrib
27088  *     if isinstance(_value, ObjectifiedElement):             # <<<<<<<<<<<<<<
27089  *         if _pytype is None:
27090  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
27091  */
27092   }
27093
27094   /* "lxml/objectify.pyx":1899
27095  *                 # special case: no change!
27096  *                 return _value.__copy__()
27097  *     if isinstance(_value, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
27098  *         # reuse existing nsmap unless redefined in nsmap parameter
27099  *         temp = _value.nsmap
27100  */
27101   __pyx_t_2 = __Pyx_TypeCheck(__pyx_v__value, __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement); 
27102   __pyx_t_1 = (__pyx_t_2 != 0);
27103   if (__pyx_t_1) {
27104
27105     /* "lxml/objectify.pyx":1901
27106  *     if isinstance(_value, ObjectifiedDataElement):
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  */
27112     __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)
27113     __Pyx_GOTREF(__pyx_t_4);
27114     __pyx_v_temp = __pyx_t_4;
27115     __pyx_t_4 = 0;
27116
27117     /* "lxml/objectify.pyx":1902
27118  *         # reuse existing nsmap unless redefined in nsmap parameter
27119  *         temp = _value.nsmap
27120  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
27121  *             temp = dict(temp)
27122  *             temp.update(nsmap)
27123  */
27124     __pyx_t_2 = (__pyx_v_temp != Py_None);
27125     __pyx_t_3 = (__pyx_t_2 != 0);
27126     if (__pyx_t_3) {
27127     } else {
27128       __pyx_t_1 = __pyx_t_3;
27129       goto __pyx_L16_bool_binop_done;
27130     }
27131     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1902, __pyx_L1_error)
27132     __pyx_t_1 = __pyx_t_3;
27133     __pyx_L16_bool_binop_done:;
27134     if (__pyx_t_1) {
27135
27136       /* "lxml/objectify.pyx":1903
27137  *         temp = _value.nsmap
27138  *         if temp is not None and temp:
27139  *             temp = dict(temp)             # <<<<<<<<<<<<<<
27140  *             temp.update(nsmap)
27141  *             nsmap = temp
27142  */
27143       __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_temp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1903, __pyx_L1_error)
27144       __Pyx_GOTREF(__pyx_t_4);
27145       __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_4);
27146       __pyx_t_4 = 0;
27147
27148       /* "lxml/objectify.pyx":1904
27149  *         if temp is not None and temp:
27150  *             temp = dict(temp)
27151  *             temp.update(nsmap)             # <<<<<<<<<<<<<<
27152  *             nsmap = temp
27153  *         # reuse existing attributes unless redefined in attrib/_attributes
27154  */
27155       __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)
27156       __Pyx_GOTREF(__pyx_t_5);
27157       __pyx_t_6 = NULL;
27158       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27159         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
27160         if (likely(__pyx_t_6)) {
27161           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27162           __Pyx_INCREF(__pyx_t_6);
27163           __Pyx_INCREF(function);
27164           __Pyx_DECREF_SET(__pyx_t_5, function);
27165         }
27166       }
27167       __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);
27168       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27169       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L1_error)
27170       __Pyx_GOTREF(__pyx_t_4);
27171       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27172       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27173
27174       /* "lxml/objectify.pyx":1905
27175  *             temp = dict(temp)
27176  *             temp.update(nsmap)
27177  *             nsmap = temp             # <<<<<<<<<<<<<<
27178  *         # reuse existing attributes unless redefined in attrib/_attributes
27179  *         temp = _value.attrib
27180  */
27181       __Pyx_INCREF(__pyx_v_temp);
27182       __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_temp);
27183
27184       /* "lxml/objectify.pyx":1902
27185  *         # reuse existing nsmap unless redefined in nsmap parameter
27186  *         temp = _value.nsmap
27187  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
27188  *             temp = dict(temp)
27189  *             temp.update(nsmap)
27190  */
27191     }
27192
27193     /* "lxml/objectify.pyx":1907
27194  *             nsmap = temp
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  */
27200     __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)
27201     __Pyx_GOTREF(__pyx_t_4);
27202     __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_4);
27203     __pyx_t_4 = 0;
27204
27205     /* "lxml/objectify.pyx":1908
27206  *         # reuse existing attributes unless redefined in attrib/_attributes
27207  *         temp = _value.attrib
27208  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
27209  *             temp = dict(temp)
27210  *             temp.update(_attributes)
27211  */
27212     __pyx_t_3 = (__pyx_v_temp != Py_None);
27213     __pyx_t_2 = (__pyx_t_3 != 0);
27214     if (__pyx_t_2) {
27215     } else {
27216       __pyx_t_1 = __pyx_t_2;
27217       goto __pyx_L19_bool_binop_done;
27218     }
27219     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1908, __pyx_L1_error)
27220     __pyx_t_1 = __pyx_t_2;
27221     __pyx_L19_bool_binop_done:;
27222     if (__pyx_t_1) {
27223
27224       /* "lxml/objectify.pyx":1909
27225  *         temp = _value.attrib
27226  *         if temp is not None and temp:
27227  *             temp = dict(temp)             # <<<<<<<<<<<<<<
27228  *             temp.update(_attributes)
27229  *             _attributes = temp
27230  */
27231       __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_temp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1909, __pyx_L1_error)
27232       __Pyx_GOTREF(__pyx_t_4);
27233       __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_4);
27234       __pyx_t_4 = 0;
27235
27236       /* "lxml/objectify.pyx":1910
27237  *         if temp is not None and temp:
27238  *             temp = dict(temp)
27239  *             temp.update(_attributes)             # <<<<<<<<<<<<<<
27240  *             _attributes = temp
27241  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
27242  */
27243       __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)
27244       __Pyx_GOTREF(__pyx_t_5);
27245       __pyx_t_6 = NULL;
27246       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27247         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
27248         if (likely(__pyx_t_6)) {
27249           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27250           __Pyx_INCREF(__pyx_t_6);
27251           __Pyx_INCREF(function);
27252           __Pyx_DECREF_SET(__pyx_t_5, function);
27253         }
27254       }
27255       __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);
27256       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27257       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1910, __pyx_L1_error)
27258       __Pyx_GOTREF(__pyx_t_4);
27259       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27260       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27261
27262       /* "lxml/objectify.pyx":1911
27263  *             temp = dict(temp)
27264  *             temp.update(_attributes)
27265  *             _attributes = temp             # <<<<<<<<<<<<<<
27266  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
27267  *         # arguments
27268  */
27269       __Pyx_INCREF(__pyx_v_temp);
27270       __Pyx_DECREF_SET(__pyx_v__attributes, __pyx_v_temp);
27271
27272       /* "lxml/objectify.pyx":1908
27273  *         # reuse existing attributes unless redefined in attrib/_attributes
27274  *         temp = _value.attrib
27275  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
27276  *             temp = dict(temp)
27277  *             temp.update(_attributes)
27278  */
27279     }
27280
27281     /* "lxml/objectify.pyx":1914
27282  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
27283  *         # arguments
27284  *         if _xsi is None and _pytype is None:             # <<<<<<<<<<<<<<
27285  *             _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)
27286  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27287  */
27288     __pyx_t_2 = (__pyx_v__xsi == Py_None);
27289     __pyx_t_3 = (__pyx_t_2 != 0);
27290     if (__pyx_t_3) {
27291     } else {
27292       __pyx_t_1 = __pyx_t_3;
27293       goto __pyx_L22_bool_binop_done;
27294     }
27295     __pyx_t_3 = (__pyx_v__pytype == Py_None);
27296     __pyx_t_2 = (__pyx_t_3 != 0);
27297     __pyx_t_1 = __pyx_t_2;
27298     __pyx_L22_bool_binop_done:;
27299     if (__pyx_t_1) {
27300
27301       /* "lxml/objectify.pyx":1915
27302  *         # arguments
27303  *         if _xsi is None and _pytype is None:
27304  *             _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)             # <<<<<<<<<<<<<<
27305  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27306  * 
27307  */
27308       __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)
27309       __Pyx_GOTREF(__pyx_t_5);
27310       __pyx_t_6 = NULL;
27311       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27312         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
27313         if (likely(__pyx_t_6)) {
27314           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27315           __Pyx_INCREF(__pyx_t_6);
27316           __Pyx_INCREF(function);
27317           __Pyx_DECREF_SET(__pyx_t_5, function);
27318         }
27319       }
27320       __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);
27321       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27322       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error)
27323       __Pyx_GOTREF(__pyx_t_4);
27324       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27325       __Pyx_DECREF_SET(__pyx_v__xsi, __pyx_t_4);
27326       __pyx_t_4 = 0;
27327
27328       /* "lxml/objectify.pyx":1916
27329  *         if _xsi is None and _pytype is None:
27330  *             _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)
27331  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<<
27332  * 
27333  *     if _xsi is not None:
27334  */
27335       __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)
27336       __Pyx_GOTREF(__pyx_t_5);
27337       __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1916, __pyx_L1_error)
27338       __Pyx_GOTREF(__pyx_t_6);
27339       __pyx_t_7 = NULL;
27340       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27341         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
27342         if (likely(__pyx_t_7)) {
27343           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27344           __Pyx_INCREF(__pyx_t_7);
27345           __Pyx_INCREF(function);
27346           __Pyx_DECREF_SET(__pyx_t_5, function);
27347         }
27348       }
27349       __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);
27350       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
27351       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27352       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1916, __pyx_L1_error)
27353       __Pyx_GOTREF(__pyx_t_4);
27354       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27355       __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_4);
27356       __pyx_t_4 = 0;
27357
27358       /* "lxml/objectify.pyx":1914
27359  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
27360  *         # arguments
27361  *         if _xsi is None and _pytype is None:             # <<<<<<<<<<<<<<
27362  *             _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)
27363  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27364  */
27365     }
27366
27367     /* "lxml/objectify.pyx":1899
27368  *                 # special case: no change!
27369  *                 return _value.__copy__()
27370  *     if isinstance(_value, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
27371  *         # reuse existing nsmap unless redefined in nsmap parameter
27372  *         temp = _value.nsmap
27373  */
27374   }
27375
27376   /* "lxml/objectify.pyx":1918
27377  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27378  * 
27379  *     if _xsi is not None:             # <<<<<<<<<<<<<<
27380  *         if u':' in _xsi:
27381  *             prefix, name = _xsi.split(u':', 1)
27382  */
27383   __pyx_t_1 = (__pyx_v__xsi != Py_None);
27384   __pyx_t_2 = (__pyx_t_1 != 0);
27385   if (__pyx_t_2) {
27386
27387     /* "lxml/objectify.pyx":1919
27388  * 
27389  *     if _xsi is not None:
27390  *         if u':' in _xsi:             # <<<<<<<<<<<<<<
27391  *             prefix, name = _xsi.split(u':', 1)
27392  *             ns = nsmap.get(prefix)
27393  */
27394     __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)
27395     __pyx_t_1 = (__pyx_t_2 != 0);
27396     if (__pyx_t_1) {
27397
27398       /* "lxml/objectify.pyx":1920
27399  *     if _xsi is not None:
27400  *         if u':' in _xsi:
27401  *             prefix, name = _xsi.split(u':', 1)             # <<<<<<<<<<<<<<
27402  *             ns = nsmap.get(prefix)
27403  *             if ns != XML_SCHEMA_NS:
27404  */
27405       __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)
27406       __Pyx_GOTREF(__pyx_t_4);
27407       __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)
27408       __Pyx_GOTREF(__pyx_t_5);
27409       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27410       if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
27411         PyObject* sequence = __pyx_t_5;
27412         Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
27413         if (unlikely(size != 2)) {
27414           if (size > 2) __Pyx_RaiseTooManyValuesError(2);
27415           else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
27416           __PYX_ERR(0, 1920, __pyx_L1_error)
27417         }
27418         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27419         if (likely(PyTuple_CheckExact(sequence))) {
27420           __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
27421           __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
27422         } else {
27423           __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
27424           __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
27425         }
27426         __Pyx_INCREF(__pyx_t_4);
27427         __Pyx_INCREF(__pyx_t_6);
27428         #else
27429         __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1920, __pyx_L1_error)
27430         __Pyx_GOTREF(__pyx_t_4);
27431         __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1920, __pyx_L1_error)
27432         __Pyx_GOTREF(__pyx_t_6);
27433         #endif
27434         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27435       } else {
27436         Py_ssize_t index = -1;
27437         __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1920, __pyx_L1_error)
27438         __Pyx_GOTREF(__pyx_t_7);
27439         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27440         __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
27441         index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L26_unpacking_failed;
27442         __Pyx_GOTREF(__pyx_t_4);
27443         index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L26_unpacking_failed;
27444         __Pyx_GOTREF(__pyx_t_6);
27445         if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1920, __pyx_L1_error)
27446         __pyx_t_8 = NULL;
27447         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27448         goto __pyx_L27_unpacking_done;
27449         __pyx_L26_unpacking_failed:;
27450         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27451         __pyx_t_8 = NULL;
27452         if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
27453         __PYX_ERR(0, 1920, __pyx_L1_error)
27454         __pyx_L27_unpacking_done:;
27455       }
27456       __pyx_v_prefix = __pyx_t_4;
27457       __pyx_t_4 = 0;
27458       __pyx_v_name = __pyx_t_6;
27459       __pyx_t_6 = 0;
27460
27461       /* "lxml/objectify.pyx":1921
27462  *         if u':' in _xsi:
27463  *             prefix, name = _xsi.split(u':', 1)
27464  *             ns = nsmap.get(prefix)             # <<<<<<<<<<<<<<
27465  *             if ns != XML_SCHEMA_NS:
27466  *                 raise ValueError, u"XSD types require the XSD namespace"
27467  */
27468       __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)
27469       __Pyx_GOTREF(__pyx_t_6);
27470       __pyx_t_4 = NULL;
27471       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
27472         __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
27473         if (likely(__pyx_t_4)) {
27474           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
27475           __Pyx_INCREF(__pyx_t_4);
27476           __Pyx_INCREF(function);
27477           __Pyx_DECREF_SET(__pyx_t_6, function);
27478         }
27479       }
27480       __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);
27481       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
27482       if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1921, __pyx_L1_error)
27483       __Pyx_GOTREF(__pyx_t_5);
27484       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27485       __pyx_v_ns = __pyx_t_5;
27486       __pyx_t_5 = 0;
27487
27488       /* "lxml/objectify.pyx":1922
27489  *             prefix, name = _xsi.split(u':', 1)
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  */
27495       __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)
27496       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1922, __pyx_L1_error)
27497       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27498       if (unlikely(__pyx_t_1)) {
27499
27500         /* "lxml/objectify.pyx":1923
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  *             name = _xsi
27506  */
27507         __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_XSD_types_require_the_XSD_namesp, 0, 0);
27508         __PYX_ERR(0, 1923, __pyx_L1_error)
27509
27510         /* "lxml/objectify.pyx":1922
27511  *             prefix, name = _xsi.split(u':', 1)
27512  *             ns = nsmap.get(prefix)
27513  *             if ns != XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
27514  *                 raise ValueError, u"XSD types require the XSD namespace"
27515  *         elif nsmap is _DEFAULT_NSMAP:
27516  */
27517       }
27518
27519       /* "lxml/objectify.pyx":1919
27520  * 
27521  *     if _xsi is not None:
27522  *         if u':' in _xsi:             # <<<<<<<<<<<<<<
27523  *             prefix, name = _xsi.split(u':', 1)
27524  *             ns = nsmap.get(prefix)
27525  */
27526       goto __pyx_L25;
27527     }
27528
27529     /* "lxml/objectify.pyx":1924
27530  *             if ns != XML_SCHEMA_NS:
27531  *                 raise ValueError, u"XSD types require the XSD namespace"
27532  *         elif nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
27533  *             name = _xsi
27534  *             _xsi = u'xsd:' + _xsi
27535  */
27536     __pyx_t_1 = (__pyx_v_nsmap == __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
27537     __pyx_t_2 = (__pyx_t_1 != 0);
27538     if (__pyx_t_2) {
27539
27540       /* "lxml/objectify.pyx":1925
27541  *                 raise ValueError, u"XSD types require the XSD namespace"
27542  *         elif nsmap is _DEFAULT_NSMAP:
27543  *             name = _xsi             # <<<<<<<<<<<<<<
27544  *             _xsi = u'xsd:' + _xsi
27545  *         else:
27546  */
27547       __Pyx_INCREF(__pyx_v__xsi);
27548       __pyx_v_name = __pyx_v__xsi;
27549
27550       /* "lxml/objectify.pyx":1926
27551  *         elif nsmap is _DEFAULT_NSMAP:
27552  *             name = _xsi
27553  *             _xsi = u'xsd:' + _xsi             # <<<<<<<<<<<<<<
27554  *         else:
27555  *             name = _xsi
27556  */
27557       __pyx_t_5 = PyNumber_Add(__pyx_kp_u_xsd, __pyx_v__xsi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1926, __pyx_L1_error)
27558       __Pyx_GOTREF(__pyx_t_5);
27559       __Pyx_DECREF_SET(__pyx_v__xsi, __pyx_t_5);
27560       __pyx_t_5 = 0;
27561
27562       /* "lxml/objectify.pyx":1924
27563  *             if ns != XML_SCHEMA_NS:
27564  *                 raise ValueError, u"XSD types require the XSD namespace"
27565  *         elif nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
27566  *             name = _xsi
27567  *             _xsi = u'xsd:' + _xsi
27568  */
27569       goto __pyx_L25;
27570     }
27571
27572     /* "lxml/objectify.pyx":1928
27573  *             _xsi = u'xsd:' + _xsi
27574  *         else:
27575  *             name = _xsi             # <<<<<<<<<<<<<<
27576  *             for prefix, ns in nsmap.items():
27577  *                 if ns == XML_SCHEMA_NS:
27578  */
27579     /*else*/ {
27580       __Pyx_INCREF(__pyx_v__xsi);
27581       __pyx_v_name = __pyx_v__xsi;
27582
27583       /* "lxml/objectify.pyx":1929
27584  *         else:
27585  *             name = _xsi
27586  *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<<
27587  *                 if ns == XML_SCHEMA_NS:
27588  *                     if prefix is not None and prefix:
27589  */
27590       __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)
27591       __Pyx_GOTREF(__pyx_t_6);
27592       __pyx_t_4 = NULL;
27593       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
27594         __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
27595         if (likely(__pyx_t_4)) {
27596           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
27597           __Pyx_INCREF(__pyx_t_4);
27598           __Pyx_INCREF(function);
27599           __Pyx_DECREF_SET(__pyx_t_6, function);
27600         }
27601       }
27602       __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
27603       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
27604       if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1929, __pyx_L1_error)
27605       __Pyx_GOTREF(__pyx_t_5);
27606       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27607       if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
27608         __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
27609         __pyx_t_10 = NULL;
27610       } else {
27611         __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1929, __pyx_L1_error)
27612         __Pyx_GOTREF(__pyx_t_6);
27613         __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1929, __pyx_L1_error)
27614       }
27615       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27616       for (;;) {
27617         if (likely(!__pyx_t_10)) {
27618           if (likely(PyList_CheckExact(__pyx_t_6))) {
27619             if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
27620             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27621             __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)
27622             #else
27623             __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)
27624             __Pyx_GOTREF(__pyx_t_5);
27625             #endif
27626           } else {
27627             if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
27628             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27629             __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)
27630             #else
27631             __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)
27632             __Pyx_GOTREF(__pyx_t_5);
27633             #endif
27634           }
27635         } else {
27636           __pyx_t_5 = __pyx_t_10(__pyx_t_6);
27637           if (unlikely(!__pyx_t_5)) {
27638             PyObject* exc_type = PyErr_Occurred();
27639             if (exc_type) {
27640               if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
27641               else __PYX_ERR(0, 1929, __pyx_L1_error)
27642             }
27643             break;
27644           }
27645           __Pyx_GOTREF(__pyx_t_5);
27646         }
27647         if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
27648           PyObject* sequence = __pyx_t_5;
27649           Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
27650           if (unlikely(size != 2)) {
27651             if (size > 2) __Pyx_RaiseTooManyValuesError(2);
27652             else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
27653             __PYX_ERR(0, 1929, __pyx_L1_error)
27654           }
27655           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27656           if (likely(PyTuple_CheckExact(sequence))) {
27657             __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
27658             __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
27659           } else {
27660             __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
27661             __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
27662           }
27663           __Pyx_INCREF(__pyx_t_4);
27664           __Pyx_INCREF(__pyx_t_7);
27665           #else
27666           __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L1_error)
27667           __Pyx_GOTREF(__pyx_t_4);
27668           __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1929, __pyx_L1_error)
27669           __Pyx_GOTREF(__pyx_t_7);
27670           #endif
27671           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27672         } else {
27673           Py_ssize_t index = -1;
27674           __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1929, __pyx_L1_error)
27675           __Pyx_GOTREF(__pyx_t_11);
27676           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27677           __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext;
27678           index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L31_unpacking_failed;
27679           __Pyx_GOTREF(__pyx_t_4);
27680           index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L31_unpacking_failed;
27681           __Pyx_GOTREF(__pyx_t_7);
27682           if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1929, __pyx_L1_error)
27683           __pyx_t_8 = NULL;
27684           __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
27685           goto __pyx_L32_unpacking_done;
27686           __pyx_L31_unpacking_failed:;
27687           __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
27688           __pyx_t_8 = NULL;
27689           if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
27690           __PYX_ERR(0, 1929, __pyx_L1_error)
27691           __pyx_L32_unpacking_done:;
27692         }
27693         __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_4);
27694         __pyx_t_4 = 0;
27695         __Pyx_XDECREF_SET(__pyx_v_ns, __pyx_t_7);
27696         __pyx_t_7 = 0;
27697
27698         /* "lxml/objectify.pyx":1930
27699  *             name = _xsi
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  */
27705         __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)
27706         __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1930, __pyx_L1_error)
27707         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27708         if (__pyx_t_2) {
27709
27710           /* "lxml/objectify.pyx":1931
27711  *             for prefix, ns in nsmap.items():
27712  *                 if ns == XML_SCHEMA_NS:
27713  *                     if prefix is not None and prefix:             # <<<<<<<<<<<<<<
27714  *                         _xsi = prefix + u':' + _xsi
27715  *                     break
27716  */
27717           __pyx_t_1 = (__pyx_v_prefix != Py_None);
27718           __pyx_t_3 = (__pyx_t_1 != 0);
27719           if (__pyx_t_3) {
27720           } else {
27721             __pyx_t_2 = __pyx_t_3;
27722             goto __pyx_L35_bool_binop_done;
27723           }
27724           __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1931, __pyx_L1_error)
27725           __pyx_t_2 = __pyx_t_3;
27726           __pyx_L35_bool_binop_done:;
27727           if (__pyx_t_2) {
27728
27729             /* "lxml/objectify.pyx":1932
27730  *                 if ns == XML_SCHEMA_NS:
27731  *                     if prefix is not None and prefix:
27732  *                         _xsi = prefix + u':' + _xsi             # <<<<<<<<<<<<<<
27733  *                     break
27734  *             else:
27735  */
27736             __pyx_t_5 = PyNumber_Add(__pyx_v_prefix, __pyx_kp_u__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1932, __pyx_L1_error)
27737             __Pyx_GOTREF(__pyx_t_5);
27738             __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_v__xsi); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1932, __pyx_L1_error)
27739             __Pyx_GOTREF(__pyx_t_7);
27740             __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27741             __Pyx_DECREF_SET(__pyx_v__xsi, __pyx_t_7);
27742             __pyx_t_7 = 0;
27743
27744             /* "lxml/objectify.pyx":1931
27745  *             for prefix, ns in nsmap.items():
27746  *                 if ns == XML_SCHEMA_NS:
27747  *                     if prefix is not None and prefix:             # <<<<<<<<<<<<<<
27748  *                         _xsi = prefix + u':' + _xsi
27749  *                     break
27750  */
27751           }
27752
27753           /* "lxml/objectify.pyx":1933
27754  *                     if prefix is not None and prefix:
27755  *                         _xsi = prefix + u':' + _xsi
27756  *                     break             # <<<<<<<<<<<<<<
27757  *             else:
27758  *                 raise ValueError, u"XSD types require the XSD namespace"
27759  */
27760           goto __pyx_L30_break;
27761
27762           /* "lxml/objectify.pyx":1930
27763  *             name = _xsi
27764  *             for prefix, ns in nsmap.items():
27765  *                 if ns == XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
27766  *                     if prefix is not None and prefix:
27767  *                         _xsi = prefix + u':' + _xsi
27768  */
27769         }
27770
27771         /* "lxml/objectify.pyx":1929
27772  *         else:
27773  *             name = _xsi
27774  *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<<
27775  *                 if ns == XML_SCHEMA_NS:
27776  *                     if prefix is not None and prefix:
27777  */
27778       }
27779       /*else*/ {
27780
27781         /* "lxml/objectify.pyx":1935
27782  *                     break
27783  *             else:
27784  *                 raise ValueError, u"XSD types require the XSD namespace"             # <<<<<<<<<<<<<<
27785  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
27786  *         if _pytype is None:
27787  */
27788         __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_XSD_types_require_the_XSD_namesp, 0, 0);
27789         __PYX_ERR(0, 1935, __pyx_L1_error)
27790       }
27791
27792       /* "lxml/objectify.pyx":1929
27793  *         else:
27794  *             name = _xsi
27795  *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<<
27796  *                 if ns == XML_SCHEMA_NS:
27797  *                     if prefix is not None and prefix:
27798  */
27799       __pyx_L30_break:;
27800       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27801     }
27802     __pyx_L25:;
27803
27804     /* "lxml/objectify.pyx":1936
27805  *             else:
27806  *                 raise ValueError, u"XSD types require the XSD namespace"
27807  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi             # <<<<<<<<<<<<<<
27808  *         if _pytype is None:
27809  *             # allow using unregistered or even wrong xsi:type names
27810  */
27811     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)
27812
27813     /* "lxml/objectify.pyx":1937
27814  *                 raise ValueError, u"XSD types require the XSD namespace"
27815  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
27816  *         if _pytype is None:             # <<<<<<<<<<<<<<
27817  *             # allow using unregistered or even wrong xsi:type names
27818  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27819  */
27820     __pyx_t_2 = (__pyx_v__pytype == Py_None);
27821     __pyx_t_3 = (__pyx_t_2 != 0);
27822     if (__pyx_t_3) {
27823
27824       /* "lxml/objectify.pyx":1939
27825  *         if _pytype is None:
27826  *             # allow using unregistered or even wrong xsi:type names
27827  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)             # <<<<<<<<<<<<<<
27828  *             if py_type is None:
27829  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27830  */
27831       if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
27832         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
27833         __PYX_ERR(0, 1939, __pyx_L1_error)
27834       }
27835       __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)
27836       __Pyx_GOTREF(__pyx_t_6);
27837       __pyx_t_7 = __pyx_t_6;
27838       __Pyx_INCREF(__pyx_t_7);
27839       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27840       __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_7);
27841       __pyx_t_7 = 0;
27842
27843       /* "lxml/objectify.pyx":1940
27844  *             # allow using unregistered or even wrong xsi:type names
27845  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27846  *             if py_type is None:             # <<<<<<<<<<<<<<
27847  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27848  *             if py_type is not None:
27849  */
27850       __pyx_t_3 = (((PyObject *)__pyx_v_py_type) == Py_None);
27851       __pyx_t_2 = (__pyx_t_3 != 0);
27852       if (__pyx_t_2) {
27853
27854         /* "lxml/objectify.pyx":1941
27855  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27856  *             if py_type is None:
27857  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)             # <<<<<<<<<<<<<<
27858  *             if py_type is not None:
27859  *                 _pytype = py_type.name
27860  */
27861         if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
27862           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
27863           __PYX_ERR(0, 1941, __pyx_L1_error)
27864         }
27865         __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)
27866         __Pyx_GOTREF(__pyx_t_7);
27867         __pyx_t_6 = __pyx_t_7;
27868         __Pyx_INCREF(__pyx_t_6);
27869         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27870         __Pyx_DECREF_SET(__pyx_v_py_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
27871         __pyx_t_6 = 0;
27872
27873         /* "lxml/objectify.pyx":1940
27874  *             # allow using unregistered or even wrong xsi:type names
27875  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27876  *             if py_type is None:             # <<<<<<<<<<<<<<
27877  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27878  *             if py_type is not None:
27879  */
27880       }
27881
27882       /* "lxml/objectify.pyx":1942
27883  *             if py_type is None:
27884  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27885  *             if py_type is not None:             # <<<<<<<<<<<<<<
27886  *                 _pytype = py_type.name
27887  * 
27888  */
27889       __pyx_t_2 = (((PyObject *)__pyx_v_py_type) != Py_None);
27890       __pyx_t_3 = (__pyx_t_2 != 0);
27891       if (__pyx_t_3) {
27892
27893         /* "lxml/objectify.pyx":1943
27894  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27895  *             if py_type is not None:
27896  *                 _pytype = py_type.name             # <<<<<<<<<<<<<<
27897  * 
27898  *     if _pytype is None:
27899  */
27900         __pyx_t_6 = __pyx_v_py_type->name;
27901         __Pyx_INCREF(__pyx_t_6);
27902         __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_6);
27903         __pyx_t_6 = 0;
27904
27905         /* "lxml/objectify.pyx":1942
27906  *             if py_type is None:
27907  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27908  *             if py_type is not None:             # <<<<<<<<<<<<<<
27909  *                 _pytype = py_type.name
27910  * 
27911  */
27912       }
27913
27914       /* "lxml/objectify.pyx":1937
27915  *                 raise ValueError, u"XSD types require the XSD namespace"
27916  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
27917  *         if _pytype is None:             # <<<<<<<<<<<<<<
27918  *             # allow using unregistered or even wrong xsi:type names
27919  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27920  */
27921     }
27922
27923     /* "lxml/objectify.pyx":1918
27924  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27925  * 
27926  *     if _xsi is not None:             # <<<<<<<<<<<<<<
27927  *         if u':' in _xsi:
27928  *             prefix, name = _xsi.split(u':', 1)
27929  */
27930   }
27931
27932   /* "lxml/objectify.pyx":1945
27933  *                 _pytype = py_type.name
27934  * 
27935  *     if _pytype is None:             # <<<<<<<<<<<<<<
27936  *         _pytype = _pytypename(_value)
27937  * 
27938  */
27939   __pyx_t_3 = (__pyx_v__pytype == Py_None);
27940   __pyx_t_2 = (__pyx_t_3 != 0);
27941   if (__pyx_t_2) {
27942
27943     /* "lxml/objectify.pyx":1946
27944  * 
27945  *     if _pytype is None:
27946  *         _pytype = _pytypename(_value)             # <<<<<<<<<<<<<<
27947  * 
27948  *     if _value is None and _pytype != u"str":
27949  */
27950     __pyx_t_6 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v__value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1946, __pyx_L1_error)
27951     __Pyx_GOTREF(__pyx_t_6);
27952     __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_6);
27953     __pyx_t_6 = 0;
27954
27955     /* "lxml/objectify.pyx":1945
27956  *                 _pytype = py_type.name
27957  * 
27958  *     if _pytype is None:             # <<<<<<<<<<<<<<
27959  *         _pytype = _pytypename(_value)
27960  * 
27961  */
27962   }
27963
27964   /* "lxml/objectify.pyx":1948
27965  *         _pytype = _pytypename(_value)
27966  * 
27967  *     if _value is None and _pytype != u"str":             # <<<<<<<<<<<<<<
27968  *         _pytype = _pytype or u"NoneType"
27969  *         strval = None
27970  */
27971   __pyx_t_3 = (__pyx_v__value == Py_None);
27972   __pyx_t_1 = (__pyx_t_3 != 0);
27973   if (__pyx_t_1) {
27974   } else {
27975     __pyx_t_2 = __pyx_t_1;
27976     goto __pyx_L43_bool_binop_done;
27977   }
27978   __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)
27979   __pyx_t_2 = __pyx_t_1;
27980   __pyx_L43_bool_binop_done:;
27981   if (__pyx_t_2) {
27982
27983     /* "lxml/objectify.pyx":1949
27984  * 
27985  *     if _value is None and _pytype != u"str":
27986  *         _pytype = _pytype or u"NoneType"             # <<<<<<<<<<<<<<
27987  *         strval = None
27988  *     elif python._isString(_value):
27989  */
27990     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__pytype); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1949, __pyx_L1_error)
27991     if (!__pyx_t_2) {
27992     } else {
27993       __Pyx_INCREF(__pyx_v__pytype);
27994       __pyx_t_6 = __pyx_v__pytype;
27995       goto __pyx_L45_bool_binop_done;
27996     }
27997     __Pyx_INCREF(__pyx_n_u_NoneType);
27998     __pyx_t_6 = __pyx_n_u_NoneType;
27999     __pyx_L45_bool_binop_done:;
28000     __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_6);
28001     __pyx_t_6 = 0;
28002
28003     /* "lxml/objectify.pyx":1950
28004  *     if _value is None and _pytype != u"str":
28005  *         _pytype = _pytype or u"NoneType"
28006  *         strval = None             # <<<<<<<<<<<<<<
28007  *     elif python._isString(_value):
28008  *         strval = _value
28009  */
28010     __Pyx_INCREF(Py_None);
28011     __pyx_v_strval = Py_None;
28012
28013     /* "lxml/objectify.pyx":1948
28014  *         _pytype = _pytypename(_value)
28015  * 
28016  *     if _value is None and _pytype != u"str":             # <<<<<<<<<<<<<<
28017  *         _pytype = _pytype or u"NoneType"
28018  *         strval = None
28019  */
28020     goto __pyx_L42;
28021   }
28022
28023   /* "lxml/objectify.pyx":1951
28024  *         _pytype = _pytype or u"NoneType"
28025  *         strval = None
28026  *     elif python._isString(_value):             # <<<<<<<<<<<<<<
28027  *         strval = _value
28028  *     elif isinstance(_value, bool):
28029  */
28030   __pyx_t_2 = (_isString(__pyx_v__value) != 0);
28031   if (__pyx_t_2) {
28032
28033     /* "lxml/objectify.pyx":1952
28034  *         strval = None
28035  *     elif python._isString(_value):
28036  *         strval = _value             # <<<<<<<<<<<<<<
28037  *     elif isinstance(_value, bool):
28038  *         if _value:
28039  */
28040     __Pyx_INCREF(__pyx_v__value);
28041     __pyx_v_strval = __pyx_v__value;
28042
28043     /* "lxml/objectify.pyx":1951
28044  *         _pytype = _pytype or u"NoneType"
28045  *         strval = None
28046  *     elif python._isString(_value):             # <<<<<<<<<<<<<<
28047  *         strval = _value
28048  *     elif isinstance(_value, bool):
28049  */
28050     goto __pyx_L42;
28051   }
28052
28053   /* "lxml/objectify.pyx":1953
28054  *     elif python._isString(_value):
28055  *         strval = _value
28056  *     elif isinstance(_value, bool):             # <<<<<<<<<<<<<<
28057  *         if _value:
28058  *             strval = u"true"
28059  */
28060   __pyx_t_6 = ((PyObject*)&PyBool_Type);
28061   __Pyx_INCREF(__pyx_t_6);
28062   __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)
28063   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28064   __pyx_t_1 = (__pyx_t_2 != 0);
28065   if (__pyx_t_1) {
28066
28067     /* "lxml/objectify.pyx":1954
28068  *         strval = _value
28069  *     elif isinstance(_value, bool):
28070  *         if _value:             # <<<<<<<<<<<<<<
28071  *             strval = u"true"
28072  *         else:
28073  */
28074     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1954, __pyx_L1_error)
28075     if (__pyx_t_1) {
28076
28077       /* "lxml/objectify.pyx":1955
28078  *     elif isinstance(_value, bool):
28079  *         if _value:
28080  *             strval = u"true"             # <<<<<<<<<<<<<<
28081  *         else:
28082  *             strval = u"false"
28083  */
28084       __Pyx_INCREF(__pyx_n_u_true);
28085       __pyx_v_strval = __pyx_n_u_true;
28086
28087       /* "lxml/objectify.pyx":1954
28088  *         strval = _value
28089  *     elif isinstance(_value, bool):
28090  *         if _value:             # <<<<<<<<<<<<<<
28091  *             strval = u"true"
28092  *         else:
28093  */
28094       goto __pyx_L47;
28095     }
28096
28097     /* "lxml/objectify.pyx":1957
28098  *             strval = u"true"
28099  *         else:
28100  *             strval = u"false"             # <<<<<<<<<<<<<<
28101  *     else:
28102  *         py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28103  */
28104     /*else*/ {
28105       __Pyx_INCREF(__pyx_n_u_false);
28106       __pyx_v_strval = __pyx_n_u_false;
28107     }
28108     __pyx_L47:;
28109
28110     /* "lxml/objectify.pyx":1953
28111  *     elif python._isString(_value):
28112  *         strval = _value
28113  *     elif isinstance(_value, bool):             # <<<<<<<<<<<<<<
28114  *         if _value:
28115  *             strval = u"true"
28116  */
28117     goto __pyx_L42;
28118   }
28119
28120   /* "lxml/objectify.pyx":1959
28121  *             strval = u"false"
28122  *     else:
28123  *         py_type = <PyType>_PYTYPE_DICT.get(_pytype)             # <<<<<<<<<<<<<<
28124  *         stringify = unicode if py_type is None else py_type.stringify
28125  *         strval = stringify(_value)
28126  */
28127   /*else*/ {
28128     if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
28129       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
28130       __PYX_ERR(0, 1959, __pyx_L1_error)
28131     }
28132     __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)
28133     __Pyx_GOTREF(__pyx_t_6);
28134     __pyx_t_7 = __pyx_t_6;
28135     __Pyx_INCREF(__pyx_t_7);
28136     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28137     __Pyx_XDECREF_SET(__pyx_v_py_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_7));
28138     __pyx_t_7 = 0;
28139
28140     /* "lxml/objectify.pyx":1960
28141  *     else:
28142  *         py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28143  *         stringify = unicode if py_type is None else py_type.stringify             # <<<<<<<<<<<<<<
28144  *         strval = stringify(_value)
28145  * 
28146  */
28147     __pyx_t_1 = (((PyObject *)__pyx_v_py_type) == Py_None);
28148     if ((__pyx_t_1 != 0)) {
28149       __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
28150       __pyx_t_7 = ((PyObject *)(&PyUnicode_Type));
28151     } else {
28152       __Pyx_INCREF(__pyx_v_py_type->stringify);
28153       __pyx_t_7 = __pyx_v_py_type->stringify;
28154     }
28155     __pyx_v_stringify = __pyx_t_7;
28156     __pyx_t_7 = 0;
28157
28158     /* "lxml/objectify.pyx":1961
28159  *         py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28160  *         stringify = unicode if py_type is None else py_type.stringify
28161  *         strval = stringify(_value)             # <<<<<<<<<<<<<<
28162  * 
28163  *     if _pytype is not None:
28164  */
28165     __Pyx_INCREF(__pyx_v_stringify);
28166     __pyx_t_6 = __pyx_v_stringify; __pyx_t_5 = NULL;
28167     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
28168       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
28169       if (likely(__pyx_t_5)) {
28170         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
28171         __Pyx_INCREF(__pyx_t_5);
28172         __Pyx_INCREF(function);
28173         __Pyx_DECREF_SET(__pyx_t_6, function);
28174       }
28175     }
28176     __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);
28177     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
28178     if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1961, __pyx_L1_error)
28179     __Pyx_GOTREF(__pyx_t_7);
28180     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28181     __pyx_v_strval = __pyx_t_7;
28182     __pyx_t_7 = 0;
28183   }
28184   __pyx_L42:;
28185
28186   /* "lxml/objectify.pyx":1963
28187  *         strval = stringify(_value)
28188  * 
28189  *     if _pytype is not None:             # <<<<<<<<<<<<<<
28190  *         if _pytype == u"NoneType" or _pytype == u"none":
28191  *             strval = None
28192  */
28193   __pyx_t_1 = (__pyx_v__pytype != Py_None);
28194   __pyx_t_2 = (__pyx_t_1 != 0);
28195   if (__pyx_t_2) {
28196
28197     /* "lxml/objectify.pyx":1964
28198  * 
28199  *     if _pytype is not None:
28200  *         if _pytype == u"NoneType" or _pytype == u"none":             # <<<<<<<<<<<<<<
28201  *             strval = None
28202  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
28203  */
28204     __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)
28205     if (!__pyx_t_1) {
28206     } else {
28207       __pyx_t_2 = __pyx_t_1;
28208       goto __pyx_L50_bool_binop_done;
28209     }
28210     __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)
28211     __pyx_t_2 = __pyx_t_1;
28212     __pyx_L50_bool_binop_done:;
28213     if (__pyx_t_2) {
28214
28215       /* "lxml/objectify.pyx":1965
28216  *     if _pytype is not None:
28217  *         if _pytype == u"NoneType" or _pytype == u"none":
28218  *             strval = None             # <<<<<<<<<<<<<<
28219  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
28220  *         else:
28221  */
28222       __Pyx_INCREF(Py_None);
28223       __Pyx_DECREF_SET(__pyx_v_strval, Py_None);
28224
28225       /* "lxml/objectify.pyx":1966
28226  *         if _pytype == u"NoneType" or _pytype == u"none":
28227  *             strval = None
28228  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"             # <<<<<<<<<<<<<<
28229  *         else:
28230  *             # check if type information from arguments is valid
28231  */
28232       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)
28233
28234       /* "lxml/objectify.pyx":1964
28235  * 
28236  *     if _pytype is not None:
28237  *         if _pytype == u"NoneType" or _pytype == u"none":             # <<<<<<<<<<<<<<
28238  *             strval = None
28239  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
28240  */
28241       goto __pyx_L49;
28242     }
28243
28244     /* "lxml/objectify.pyx":1969
28245  *         else:
28246  *             # check if type information from arguments is valid
28247  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)             # <<<<<<<<<<<<<<
28248  *             if py_type is not None:
28249  *                 if py_type.type_check is not None:
28250  */
28251     /*else*/ {
28252       if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
28253         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
28254         __PYX_ERR(0, 1969, __pyx_L1_error)
28255       }
28256       __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)
28257       __Pyx_GOTREF(__pyx_t_7);
28258       __pyx_t_6 = __pyx_t_7;
28259       __Pyx_INCREF(__pyx_t_6);
28260       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28261       __Pyx_XDECREF_SET(__pyx_v_py_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
28262       __pyx_t_6 = 0;
28263
28264       /* "lxml/objectify.pyx":1970
28265  *             # check if type information from arguments is valid
28266  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28267  *             if py_type is not None:             # <<<<<<<<<<<<<<
28268  *                 if py_type.type_check is not None:
28269  *                     py_type.type_check(strval)
28270  */
28271       __pyx_t_2 = (((PyObject *)__pyx_v_py_type) != Py_None);
28272       __pyx_t_1 = (__pyx_t_2 != 0);
28273       if (__pyx_t_1) {
28274
28275         /* "lxml/objectify.pyx":1971
28276  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28277  *             if py_type is not None:
28278  *                 if py_type.type_check is not None:             # <<<<<<<<<<<<<<
28279  *                     py_type.type_check(strval)
28280  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
28281  */
28282         __pyx_t_1 = (__pyx_v_py_type->type_check != Py_None);
28283         __pyx_t_2 = (__pyx_t_1 != 0);
28284         if (__pyx_t_2) {
28285
28286           /* "lxml/objectify.pyx":1972
28287  *             if py_type is not None:
28288  *                 if py_type.type_check is not None:
28289  *                     py_type.type_check(strval)             # <<<<<<<<<<<<<<
28290  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
28291  * 
28292  */
28293           __Pyx_INCREF(__pyx_v_py_type->type_check);
28294           __pyx_t_7 = __pyx_v_py_type->type_check; __pyx_t_5 = NULL;
28295           if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
28296             __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
28297             if (likely(__pyx_t_5)) {
28298               PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
28299               __Pyx_INCREF(__pyx_t_5);
28300               __Pyx_INCREF(function);
28301               __Pyx_DECREF_SET(__pyx_t_7, function);
28302             }
28303           }
28304           __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);
28305           __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
28306           if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1972, __pyx_L1_error)
28307           __Pyx_GOTREF(__pyx_t_6);
28308           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28309           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28310
28311           /* "lxml/objectify.pyx":1971
28312  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28313  *             if py_type is not None:
28314  *                 if py_type.type_check is not None:             # <<<<<<<<<<<<<<
28315  *                     py_type.type_check(strval)
28316  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
28317  */
28318         }
28319
28320         /* "lxml/objectify.pyx":1973
28321  *                 if py_type.type_check is not None:
28322  *                     py_type.type_check(strval)
28323  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
28324  * 
28325  *     return _makeElement(u"value", strval, _attributes, nsmap)
28326  */
28327         __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1973, __pyx_L1_error)
28328         __Pyx_GOTREF(__pyx_t_6);
28329         if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_t_6, __pyx_v__pytype) < 0)) __PYX_ERR(0, 1973, __pyx_L1_error)
28330         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28331
28332         /* "lxml/objectify.pyx":1970
28333  *             # check if type information from arguments is valid
28334  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28335  *             if py_type is not None:             # <<<<<<<<<<<<<<
28336  *                 if py_type.type_check is not None:
28337  *                     py_type.type_check(strval)
28338  */
28339       }
28340     }
28341     __pyx_L49:;
28342
28343     /* "lxml/objectify.pyx":1963
28344  *         strval = stringify(_value)
28345  * 
28346  *     if _pytype is not None:             # <<<<<<<<<<<<<<
28347  *         if _pytype == u"NoneType" or _pytype == u"none":
28348  *             strval = None
28349  */
28350   }
28351
28352   /* "lxml/objectify.pyx":1975
28353  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
28354  * 
28355  *     return _makeElement(u"value", strval, _attributes, nsmap)             # <<<<<<<<<<<<<<
28356  * 
28357  * 
28358  */
28359   __Pyx_XDECREF(__pyx_r);
28360   __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)
28361   __Pyx_GOTREF(__pyx_t_6);
28362   __pyx_r = __pyx_t_6;
28363   __pyx_t_6 = 0;
28364   goto __pyx_L0;
28365
28366   /* "lxml/objectify.pyx":1872
28367  *     return _makeElement(_tag, None, _attributes, nsmap)
28368  * 
28369  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
28370  *                 **_attributes):
28371  *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
28372  */
28373
28374   /* function exit code */
28375   __pyx_L1_error:;
28376   __Pyx_XDECREF(__pyx_t_4);
28377   __Pyx_XDECREF(__pyx_t_5);
28378   __Pyx_XDECREF(__pyx_t_6);
28379   __Pyx_XDECREF(__pyx_t_7);
28380   __Pyx_XDECREF(__pyx_t_11);
28381   __Pyx_AddTraceback("lxml.objectify.DataElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
28382   __pyx_r = NULL;
28383   __pyx_L0:;
28384   __Pyx_XDECREF(__pyx_v__attributes);
28385   __Pyx_XDECREF(__pyx_v_temp);
28386   __Pyx_XDECREF(__pyx_v_prefix);
28387   __Pyx_XDECREF(__pyx_v_name);
28388   __Pyx_XDECREF(__pyx_v_ns);
28389   __Pyx_XDECREF((PyObject *)__pyx_v_py_type);
28390   __Pyx_XDECREF(__pyx_v_strval);
28391   __Pyx_XDECREF(__pyx_v_stringify);
28392   __Pyx_XDECREF(__pyx_v_attrib);
28393   __Pyx_XDECREF(__pyx_v_nsmap);
28394   __Pyx_XDECREF(__pyx_v__pytype);
28395   __Pyx_XDECREF(__pyx_v__xsi);
28396   __Pyx_XGIVEREF(__pyx_r);
28397   __Pyx_RefNannyFinishContext();
28398   return __pyx_r;
28399 }
28400
28401 /* "src/lxml/objectpath.pxi":24
28402  *     cdef _ObjectPath*  _c_path
28403  *     cdef Py_ssize_t _path_len
28404  *     def __init__(self, path):             # <<<<<<<<<<<<<<
28405  *         if python._isString(path):
28406  *             self._path = _parse_object_path_string(path)
28407  */
28408
28409 /* Python wrapper */
28410 static int __pyx_pw_4lxml_9objectify_10ObjectPath_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28411 static int __pyx_pw_4lxml_9objectify_10ObjectPath_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28412   PyObject *__pyx_v_path = 0;
28413   int __pyx_lineno = 0;
28414   const char *__pyx_filename = NULL;
28415   int __pyx_clineno = 0;
28416   int __pyx_r;
28417   __Pyx_RefNannyDeclarations
28418   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
28419   {
28420     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,0};
28421     PyObject* values[1] = {0};
28422     if (unlikely(__pyx_kwds)) {
28423       Py_ssize_t kw_args;
28424       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
28425       switch (pos_args) {
28426         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28427         CYTHON_FALLTHROUGH;
28428         case  0: break;
28429         default: goto __pyx_L5_argtuple_error;
28430       }
28431       kw_args = PyDict_Size(__pyx_kwds);
28432       switch (pos_args) {
28433         case  0:
28434         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
28435         else goto __pyx_L5_argtuple_error;
28436       }
28437       if (unlikely(kw_args > 0)) {
28438         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 24, __pyx_L3_error)
28439       }
28440     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
28441       goto __pyx_L5_argtuple_error;
28442     } else {
28443       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28444     }
28445     __pyx_v_path = values[0];
28446   }
28447   goto __pyx_L4_argument_unpacking_done;
28448   __pyx_L5_argtuple_error:;
28449   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 24, __pyx_L3_error)
28450   __pyx_L3_error:;
28451   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28452   __Pyx_RefNannyFinishContext();
28453   return -1;
28454   __pyx_L4_argument_unpacking_done:;
28455   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath___init__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_path);
28456
28457   /* function exit code */
28458   __Pyx_RefNannyFinishContext();
28459   return __pyx_r;
28460 }
28461
28462 static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, PyObject *__pyx_v_path) {
28463   int __pyx_r;
28464   __Pyx_RefNannyDeclarations
28465   int __pyx_t_1;
28466   PyObject *__pyx_t_2 = NULL;
28467   Py_ssize_t __pyx_t_3;
28468   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_t_4;
28469   int __pyx_lineno = 0;
28470   const char *__pyx_filename = NULL;
28471   int __pyx_clineno = 0;
28472   __Pyx_RefNannySetupContext("__init__", 0);
28473
28474   /* "src/lxml/objectpath.pxi":25
28475  *     cdef Py_ssize_t _path_len
28476  *     def __init__(self, path):
28477  *         if python._isString(path):             # <<<<<<<<<<<<<<
28478  *             self._path = _parse_object_path_string(path)
28479  *             self._path_str = path
28480  */
28481   __pyx_t_1 = (_isString(__pyx_v_path) != 0);
28482   if (__pyx_t_1) {
28483
28484     /* "src/lxml/objectpath.pxi":26
28485  *     def __init__(self, path):
28486  *         if python._isString(path):
28487  *             self._path = _parse_object_path_string(path)             # <<<<<<<<<<<<<<
28488  *             self._path_str = path
28489  *         else:
28490  */
28491     __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)
28492     __Pyx_GOTREF(__pyx_t_2);
28493     __Pyx_GIVEREF(__pyx_t_2);
28494     __Pyx_GOTREF(__pyx_v_self->_path);
28495     __Pyx_DECREF(__pyx_v_self->_path);
28496     __pyx_v_self->_path = ((PyObject*)__pyx_t_2);
28497     __pyx_t_2 = 0;
28498
28499     /* "src/lxml/objectpath.pxi":27
28500  *         if python._isString(path):
28501  *             self._path = _parse_object_path_string(path)
28502  *             self._path_str = path             # <<<<<<<<<<<<<<
28503  *         else:
28504  *             self._path = _parse_object_path_list(path)
28505  */
28506     __Pyx_INCREF(__pyx_v_path);
28507     __Pyx_GIVEREF(__pyx_v_path);
28508     __Pyx_GOTREF(__pyx_v_self->_path_str);
28509     __Pyx_DECREF(__pyx_v_self->_path_str);
28510     __pyx_v_self->_path_str = __pyx_v_path;
28511
28512     /* "src/lxml/objectpath.pxi":25
28513  *     cdef Py_ssize_t _path_len
28514  *     def __init__(self, path):
28515  *         if python._isString(path):             # <<<<<<<<<<<<<<
28516  *             self._path = _parse_object_path_string(path)
28517  *             self._path_str = path
28518  */
28519     goto __pyx_L3;
28520   }
28521
28522   /* "src/lxml/objectpath.pxi":29
28523  *             self._path_str = path
28524  *         else:
28525  *             self._path = _parse_object_path_list(path)             # <<<<<<<<<<<<<<
28526  *             self._path_str = u'.'.join(path)
28527  *         self._path_len = len(self._path)
28528  */
28529   /*else*/ {
28530     __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)
28531     __Pyx_GOTREF(__pyx_t_2);
28532     __Pyx_GIVEREF(__pyx_t_2);
28533     __Pyx_GOTREF(__pyx_v_self->_path);
28534     __Pyx_DECREF(__pyx_v_self->_path);
28535     __pyx_v_self->_path = ((PyObject*)__pyx_t_2);
28536     __pyx_t_2 = 0;
28537
28538     /* "src/lxml/objectpath.pxi":30
28539  *         else:
28540  *             self._path = _parse_object_path_list(path)
28541  *             self._path_str = u'.'.join(path)             # <<<<<<<<<<<<<<
28542  *         self._path_len = len(self._path)
28543  *         self._c_path = _build_object_path_segments(self._path)
28544  */
28545     __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__2, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 30, __pyx_L1_error)
28546     __Pyx_GOTREF(__pyx_t_2);
28547     __Pyx_GIVEREF(__pyx_t_2);
28548     __Pyx_GOTREF(__pyx_v_self->_path_str);
28549     __Pyx_DECREF(__pyx_v_self->_path_str);
28550     __pyx_v_self->_path_str = __pyx_t_2;
28551     __pyx_t_2 = 0;
28552   }
28553   __pyx_L3:;
28554
28555   /* "src/lxml/objectpath.pxi":31
28556  *             self._path = _parse_object_path_list(path)
28557  *             self._path_str = u'.'.join(path)
28558  *         self._path_len = len(self._path)             # <<<<<<<<<<<<<<
28559  *         self._c_path = _build_object_path_segments(self._path)
28560  *         self.find = self.__call__
28561  */
28562   __pyx_t_2 = __pyx_v_self->_path;
28563   __Pyx_INCREF(__pyx_t_2);
28564   if (unlikely(__pyx_t_2 == Py_None)) {
28565     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
28566     __PYX_ERR(1, 31, __pyx_L1_error)
28567   }
28568   __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)
28569   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28570   __pyx_v_self->_path_len = __pyx_t_3;
28571
28572   /* "src/lxml/objectpath.pxi":32
28573  *             self._path_str = u'.'.join(path)
28574  *         self._path_len = len(self._path)
28575  *         self._c_path = _build_object_path_segments(self._path)             # <<<<<<<<<<<<<<
28576  *         self.find = self.__call__
28577  * 
28578  */
28579   __pyx_t_2 = __pyx_v_self->_path;
28580   __Pyx_INCREF(__pyx_t_2);
28581   __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)
28582   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28583   __pyx_v_self->_c_path = __pyx_t_4;
28584
28585   /* "src/lxml/objectpath.pxi":33
28586  *         self._path_len = len(self._path)
28587  *         self._c_path = _build_object_path_segments(self._path)
28588  *         self.find = self.__call__             # <<<<<<<<<<<<<<
28589  * 
28590  *     def __dealloc__(self):
28591  */
28592   __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)
28593   __Pyx_GOTREF(__pyx_t_2);
28594   __Pyx_GIVEREF(__pyx_t_2);
28595   __Pyx_GOTREF(__pyx_v_self->find);
28596   __Pyx_DECREF(__pyx_v_self->find);
28597   __pyx_v_self->find = __pyx_t_2;
28598   __pyx_t_2 = 0;
28599
28600   /* "src/lxml/objectpath.pxi":24
28601  *     cdef _ObjectPath*  _c_path
28602  *     cdef Py_ssize_t _path_len
28603  *     def __init__(self, path):             # <<<<<<<<<<<<<<
28604  *         if python._isString(path):
28605  *             self._path = _parse_object_path_string(path)
28606  */
28607
28608   /* function exit code */
28609   __pyx_r = 0;
28610   goto __pyx_L0;
28611   __pyx_L1_error:;
28612   __Pyx_XDECREF(__pyx_t_2);
28613   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28614   __pyx_r = -1;
28615   __pyx_L0:;
28616   __Pyx_RefNannyFinishContext();
28617   return __pyx_r;
28618 }
28619
28620 /* "src/lxml/objectpath.pxi":35
28621  *         self.find = self.__call__
28622  * 
28623  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
28624  *         if self._c_path is not NULL:
28625  *             python.lxml_free(self._c_path)
28626  */
28627
28628 /* Python wrapper */
28629 static void __pyx_pw_4lxml_9objectify_10ObjectPath_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
28630 static void __pyx_pw_4lxml_9objectify_10ObjectPath_3__dealloc__(PyObject *__pyx_v_self) {
28631   __Pyx_RefNannyDeclarations
28632   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
28633   __pyx_pf_4lxml_9objectify_10ObjectPath_2__dealloc__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self));
28634
28635   /* function exit code */
28636   __Pyx_RefNannyFinishContext();
28637 }
28638
28639 static void __pyx_pf_4lxml_9objectify_10ObjectPath_2__dealloc__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self) {
28640   __Pyx_RefNannyDeclarations
28641   int __pyx_t_1;
28642   __Pyx_RefNannySetupContext("__dealloc__", 0);
28643
28644   /* "src/lxml/objectpath.pxi":36
28645  * 
28646  *     def __dealloc__(self):
28647  *         if self._c_path is not NULL:             # <<<<<<<<<<<<<<
28648  *             python.lxml_free(self._c_path)
28649  * 
28650  */
28651   __pyx_t_1 = ((__pyx_v_self->_c_path != NULL) != 0);
28652   if (__pyx_t_1) {
28653
28654     /* "src/lxml/objectpath.pxi":37
28655  *     def __dealloc__(self):
28656  *         if self._c_path is not NULL:
28657  *             python.lxml_free(self._c_path)             # <<<<<<<<<<<<<<
28658  * 
28659  *     def __str__(self):
28660  */
28661     lxml_free(__pyx_v_self->_c_path);
28662
28663     /* "src/lxml/objectpath.pxi":36
28664  * 
28665  *     def __dealloc__(self):
28666  *         if self._c_path is not NULL:             # <<<<<<<<<<<<<<
28667  *             python.lxml_free(self._c_path)
28668  * 
28669  */
28670   }
28671
28672   /* "src/lxml/objectpath.pxi":35
28673  *         self.find = self.__call__
28674  * 
28675  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
28676  *         if self._c_path is not NULL:
28677  *             python.lxml_free(self._c_path)
28678  */
28679
28680   /* function exit code */
28681   __Pyx_RefNannyFinishContext();
28682 }
28683
28684 /* "src/lxml/objectpath.pxi":39
28685  *             python.lxml_free(self._c_path)
28686  * 
28687  *     def __str__(self):             # <<<<<<<<<<<<<<
28688  *         return self._path_str
28689  * 
28690  */
28691
28692 /* Python wrapper */
28693 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_5__str__(PyObject *__pyx_v_self); /*proto*/
28694 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_5__str__(PyObject *__pyx_v_self) {
28695   PyObject *__pyx_r = 0;
28696   __Pyx_RefNannyDeclarations
28697   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
28698   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_4__str__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self));
28699
28700   /* function exit code */
28701   __Pyx_RefNannyFinishContext();
28702   return __pyx_r;
28703 }
28704
28705 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4__str__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self) {
28706   PyObject *__pyx_r = NULL;
28707   __Pyx_RefNannyDeclarations
28708   __Pyx_RefNannySetupContext("__str__", 0);
28709
28710   /* "src/lxml/objectpath.pxi":40
28711  * 
28712  *     def __str__(self):
28713  *         return self._path_str             # <<<<<<<<<<<<<<
28714  * 
28715  *     def __call__(self, _Element root not None, *_default):
28716  */
28717   __Pyx_XDECREF(__pyx_r);
28718   __Pyx_INCREF(__pyx_v_self->_path_str);
28719   __pyx_r = __pyx_v_self->_path_str;
28720   goto __pyx_L0;
28721
28722   /* "src/lxml/objectpath.pxi":39
28723  *             python.lxml_free(self._c_path)
28724  * 
28725  *     def __str__(self):             # <<<<<<<<<<<<<<
28726  *         return self._path_str
28727  * 
28728  */
28729
28730   /* function exit code */
28731   __pyx_L0:;
28732   __Pyx_XGIVEREF(__pyx_r);
28733   __Pyx_RefNannyFinishContext();
28734   return __pyx_r;
28735 }
28736
28737 /* "src/lxml/objectpath.pxi":42
28738  *         return self._path_str
28739  * 
28740  *     def __call__(self, _Element root not None, *_default):             # <<<<<<<<<<<<<<
28741  *         u"""Follow the attribute path in the object structure and return the
28742  *         target attribute value.
28743  */
28744
28745 /* Python wrapper */
28746 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28747 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        ";
28748 #if CYTHON_COMPILING_IN_CPYTHON
28749 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__;
28750 #endif
28751 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28752   struct LxmlElement *__pyx_v_root = 0;
28753   PyObject *__pyx_v__default = 0;
28754   int __pyx_lineno = 0;
28755   const char *__pyx_filename = NULL;
28756   int __pyx_clineno = 0;
28757   PyObject *__pyx_r = 0;
28758   __Pyx_RefNannyDeclarations
28759   __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
28760   if (PyTuple_GET_SIZE(__pyx_args) > 1) {
28761     __pyx_v__default = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
28762     if (unlikely(!__pyx_v__default)) {
28763       __Pyx_RefNannyFinishContext();
28764       return NULL;
28765     }
28766     __Pyx_GOTREF(__pyx_v__default);
28767   } else {
28768     __pyx_v__default = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
28769   }
28770   {
28771     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root,0};
28772     PyObject* values[1] = {0};
28773     if (unlikely(__pyx_kwds)) {
28774       Py_ssize_t kw_args;
28775       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
28776       switch (pos_args) {
28777         default:
28778         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28779         CYTHON_FALLTHROUGH;
28780         case  0: break;
28781       }
28782       kw_args = PyDict_Size(__pyx_kwds);
28783       switch (pos_args) {
28784         case  0:
28785         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root)) != 0)) kw_args--;
28786         else goto __pyx_L5_argtuple_error;
28787       }
28788       if (unlikely(kw_args > 0)) {
28789         const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
28790         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__call__") < 0)) __PYX_ERR(1, 42, __pyx_L3_error)
28791       }
28792     } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
28793       goto __pyx_L5_argtuple_error;
28794     } else {
28795       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28796     }
28797     __pyx_v_root = ((struct LxmlElement *)values[0]);
28798   }
28799   goto __pyx_L4_argument_unpacking_done;
28800   __pyx_L5_argtuple_error:;
28801   __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 42, __pyx_L3_error)
28802   __pyx_L3_error:;
28803   __Pyx_DECREF(__pyx_v__default); __pyx_v__default = 0;
28804   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28805   __Pyx_RefNannyFinishContext();
28806   return NULL;
28807   __pyx_L4_argument_unpacking_done:;
28808   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) __PYX_ERR(1, 42, __pyx_L1_error)
28809   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_6__call__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_root, __pyx_v__default);
28810
28811   /* function exit code */
28812   goto __pyx_L0;
28813   __pyx_L1_error:;
28814   __pyx_r = NULL;
28815   __pyx_L0:;
28816   __Pyx_XDECREF(__pyx_v__default);
28817   __Pyx_RefNannyFinishContext();
28818   return __pyx_r;
28819 }
28820
28821 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) {
28822   PyObject *__pyx_v_default = NULL;
28823   PyObject *__pyx_r = NULL;
28824   __Pyx_RefNannyDeclarations
28825   int __pyx_t_1;
28826   Py_ssize_t __pyx_t_2;
28827   PyObject *__pyx_t_3 = NULL;
28828   int __pyx_lineno = 0;
28829   const char *__pyx_filename = NULL;
28830   int __pyx_clineno = 0;
28831   __Pyx_RefNannySetupContext("__call__", 0);
28832
28833   /* "src/lxml/objectpath.pxi":49
28834  *         as second argument) or raises AttributeError.
28835  *         """
28836  *         if _default:             # <<<<<<<<<<<<<<
28837  *             if len(_default) > 1:
28838  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28839  */
28840   __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v__default) != 0);
28841   if (__pyx_t_1) {
28842
28843     /* "src/lxml/objectpath.pxi":50
28844  *         """
28845  *         if _default:
28846  *             if len(_default) > 1:             # <<<<<<<<<<<<<<
28847  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28848  *             default = _default[0]
28849  */
28850     __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)
28851     __pyx_t_1 = ((__pyx_t_2 > 1) != 0);
28852     if (unlikely(__pyx_t_1)) {
28853
28854       /* "src/lxml/objectpath.pxi":51
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  *         else:
28860  */
28861       __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_invalid_number_of_arguments_need, 0, 0);
28862       __PYX_ERR(1, 51, __pyx_L1_error)
28863
28864       /* "src/lxml/objectpath.pxi":50
28865  *         """
28866  *         if _default:
28867  *             if len(_default) > 1:             # <<<<<<<<<<<<<<
28868  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28869  *             default = _default[0]
28870  */
28871     }
28872
28873     /* "src/lxml/objectpath.pxi":52
28874  *             if len(_default) > 1:
28875  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28876  *             default = _default[0]             # <<<<<<<<<<<<<<
28877  *         else:
28878  *             default = _NO_DEFAULT
28879  */
28880     __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)
28881     __Pyx_GOTREF(__pyx_t_3);
28882     __pyx_v_default = __pyx_t_3;
28883     __pyx_t_3 = 0;
28884
28885     /* "src/lxml/objectpath.pxi":49
28886  *         as second argument) or raises AttributeError.
28887  *         """
28888  *         if _default:             # <<<<<<<<<<<<<<
28889  *             if len(_default) > 1:
28890  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28891  */
28892     goto __pyx_L3;
28893   }
28894
28895   /* "src/lxml/objectpath.pxi":54
28896  *             default = _default[0]
28897  *         else:
28898  *             default = _NO_DEFAULT             # <<<<<<<<<<<<<<
28899  *         return _find_object_path(root, self._c_path, self._path_len, default)
28900  * 
28901  */
28902   /*else*/ {
28903     __Pyx_INCREF(__pyx_v_4lxml_9objectify__NO_DEFAULT);
28904     __pyx_v_default = __pyx_v_4lxml_9objectify__NO_DEFAULT;
28905   }
28906   __pyx_L3:;
28907
28908   /* "src/lxml/objectpath.pxi":55
28909  *         else:
28910  *             default = _NO_DEFAULT
28911  *         return _find_object_path(root, self._c_path, self._path_len, default)             # <<<<<<<<<<<<<<
28912  * 
28913  *     def hasattr(self, _Element root not None):
28914  */
28915   __Pyx_XDECREF(__pyx_r);
28916   __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)
28917   __Pyx_GOTREF(__pyx_t_3);
28918   __pyx_r = __pyx_t_3;
28919   __pyx_t_3 = 0;
28920   goto __pyx_L0;
28921
28922   /* "src/lxml/objectpath.pxi":42
28923  *         return self._path_str
28924  * 
28925  *     def __call__(self, _Element root not None, *_default):             # <<<<<<<<<<<<<<
28926  *         u"""Follow the attribute path in the object structure and return the
28927  *         target attribute value.
28928  */
28929
28930   /* function exit code */
28931   __pyx_L1_error:;
28932   __Pyx_XDECREF(__pyx_t_3);
28933   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28934   __pyx_r = NULL;
28935   __pyx_L0:;
28936   __Pyx_XDECREF(__pyx_v_default);
28937   __Pyx_XGIVEREF(__pyx_r);
28938   __Pyx_RefNannyFinishContext();
28939   return __pyx_r;
28940 }
28941
28942 /* "src/lxml/objectpath.pxi":57
28943  *         return _find_object_path(root, self._c_path, self._path_len, default)
28944  * 
28945  *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
28946  *         u"hasattr(self, root)"
28947  *         try:
28948  */
28949
28950 /* Python wrapper */
28951 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root); /*proto*/
28952 static char __pyx_doc_4lxml_9objectify_10ObjectPath_8hasattr[] = "hasattr(self, root)";
28953 static PyMethodDef __pyx_mdef_4lxml_9objectify_10ObjectPath_9hasattr = {"hasattr", (PyCFunction)__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr, METH_O, __pyx_doc_4lxml_9objectify_10ObjectPath_8hasattr};
28954 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root) {
28955   int __pyx_lineno = 0;
28956   const char *__pyx_filename = NULL;
28957   int __pyx_clineno = 0;
28958   PyObject *__pyx_r = 0;
28959   __Pyx_RefNannyDeclarations
28960   __Pyx_RefNannySetupContext("hasattr (wrapper)", 0);
28961   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) __PYX_ERR(1, 57, __pyx_L1_error)
28962   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_8hasattr(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_root));
28963
28964   /* function exit code */
28965   goto __pyx_L0;
28966   __pyx_L1_error:;
28967   __pyx_r = NULL;
28968   __pyx_L0:;
28969   __Pyx_RefNannyFinishContext();
28970   return __pyx_r;
28971 }
28972
28973 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_8hasattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root) {
28974   PyObject *__pyx_r = NULL;
28975   __Pyx_RefNannyDeclarations
28976   PyObject *__pyx_t_1 = NULL;
28977   PyObject *__pyx_t_2 = NULL;
28978   PyObject *__pyx_t_3 = NULL;
28979   PyObject *__pyx_t_4 = NULL;
28980   PyObject *__pyx_t_5 = NULL;
28981   int __pyx_t_6;
28982   PyObject *__pyx_t_7 = NULL;
28983   int __pyx_lineno = 0;
28984   const char *__pyx_filename = NULL;
28985   int __pyx_clineno = 0;
28986   __Pyx_RefNannySetupContext("hasattr", 0);
28987
28988   /* "src/lxml/objectpath.pxi":59
28989  *     def hasattr(self, _Element root not None):
28990  *         u"hasattr(self, root)"
28991  *         try:             # <<<<<<<<<<<<<<
28992  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
28993  *         except AttributeError:
28994  */
28995   {
28996     __Pyx_PyThreadState_declare
28997     __Pyx_PyThreadState_assign
28998     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
28999     __Pyx_XGOTREF(__pyx_t_1);
29000     __Pyx_XGOTREF(__pyx_t_2);
29001     __Pyx_XGOTREF(__pyx_t_3);
29002     /*try:*/ {
29003
29004       /* "src/lxml/objectpath.pxi":60
29005  *         u"hasattr(self, root)"
29006  *         try:
29007  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)             # <<<<<<<<<<<<<<
29008  *         except AttributeError:
29009  *             return False
29010  */
29011       __pyx_t_4 = __pyx_v_4lxml_9objectify__NO_DEFAULT;
29012       __Pyx_INCREF(__pyx_t_4);
29013       __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)
29014       __Pyx_GOTREF(__pyx_t_5);
29015       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29016       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29017
29018       /* "src/lxml/objectpath.pxi":59
29019  *     def hasattr(self, _Element root not None):
29020  *         u"hasattr(self, root)"
29021  *         try:             # <<<<<<<<<<<<<<
29022  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
29023  *         except AttributeError:
29024  */
29025     }
29026     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
29027     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
29028     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
29029     goto __pyx_L8_try_end;
29030     __pyx_L3_error:;
29031     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
29032     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
29033
29034     /* "src/lxml/objectpath.pxi":61
29035  *         try:
29036  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
29037  *         except AttributeError:             # <<<<<<<<<<<<<<
29038  *             return False
29039  *         return True
29040  */
29041     __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
29042     if (__pyx_t_6) {
29043       __Pyx_AddTraceback("lxml.objectify.ObjectPath.hasattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29044       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 61, __pyx_L5_except_error)
29045       __Pyx_GOTREF(__pyx_t_5);
29046       __Pyx_GOTREF(__pyx_t_4);
29047       __Pyx_GOTREF(__pyx_t_7);
29048
29049       /* "src/lxml/objectpath.pxi":62
29050  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
29051  *         except AttributeError:
29052  *             return False             # <<<<<<<<<<<<<<
29053  *         return True
29054  * 
29055  */
29056       __Pyx_XDECREF(__pyx_r);
29057       __Pyx_INCREF(Py_False);
29058       __pyx_r = Py_False;
29059       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29060       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29061       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
29062       goto __pyx_L6_except_return;
29063     }
29064     goto __pyx_L5_except_error;
29065     __pyx_L5_except_error:;
29066
29067     /* "src/lxml/objectpath.pxi":59
29068  *     def hasattr(self, _Element root not None):
29069  *         u"hasattr(self, root)"
29070  *         try:             # <<<<<<<<<<<<<<
29071  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
29072  *         except AttributeError:
29073  */
29074     __Pyx_XGIVEREF(__pyx_t_1);
29075     __Pyx_XGIVEREF(__pyx_t_2);
29076     __Pyx_XGIVEREF(__pyx_t_3);
29077     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
29078     goto __pyx_L1_error;
29079     __pyx_L6_except_return:;
29080     __Pyx_XGIVEREF(__pyx_t_1);
29081     __Pyx_XGIVEREF(__pyx_t_2);
29082     __Pyx_XGIVEREF(__pyx_t_3);
29083     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
29084     goto __pyx_L0;
29085     __pyx_L8_try_end:;
29086   }
29087
29088   /* "src/lxml/objectpath.pxi":63
29089  *         except AttributeError:
29090  *             return False
29091  *         return True             # <<<<<<<<<<<<<<
29092  * 
29093  *     def setattr(self, _Element root not None, value):
29094  */
29095   __Pyx_XDECREF(__pyx_r);
29096   __Pyx_INCREF(Py_True);
29097   __pyx_r = Py_True;
29098   goto __pyx_L0;
29099
29100   /* "src/lxml/objectpath.pxi":57
29101  *         return _find_object_path(root, self._c_path, self._path_len, default)
29102  * 
29103  *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
29104  *         u"hasattr(self, root)"
29105  *         try:
29106  */
29107
29108   /* function exit code */
29109   __pyx_L1_error:;
29110   __Pyx_XDECREF(__pyx_t_4);
29111   __Pyx_XDECREF(__pyx_t_5);
29112   __Pyx_XDECREF(__pyx_t_7);
29113   __Pyx_AddTraceback("lxml.objectify.ObjectPath.hasattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29114   __pyx_r = NULL;
29115   __pyx_L0:;
29116   __Pyx_XGIVEREF(__pyx_r);
29117   __Pyx_RefNannyFinishContext();
29118   return __pyx_r;
29119 }
29120
29121 /* "src/lxml/objectpath.pxi":65
29122  *         return True
29123  * 
29124  *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
29125  *         u"""setattr(self, root, value)
29126  * 
29127  */
29128
29129 /* Python wrapper */
29130 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29131 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        ";
29132 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};
29133 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29134   struct LxmlElement *__pyx_v_root = 0;
29135   PyObject *__pyx_v_value = 0;
29136   int __pyx_lineno = 0;
29137   const char *__pyx_filename = NULL;
29138   int __pyx_clineno = 0;
29139   PyObject *__pyx_r = 0;
29140   __Pyx_RefNannyDeclarations
29141   __Pyx_RefNannySetupContext("setattr (wrapper)", 0);
29142   {
29143     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root,&__pyx_n_s_value,0};
29144     PyObject* values[2] = {0,0};
29145     if (unlikely(__pyx_kwds)) {
29146       Py_ssize_t kw_args;
29147       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29148       switch (pos_args) {
29149         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29150         CYTHON_FALLTHROUGH;
29151         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29152         CYTHON_FALLTHROUGH;
29153         case  0: break;
29154         default: goto __pyx_L5_argtuple_error;
29155       }
29156       kw_args = PyDict_Size(__pyx_kwds);
29157       switch (pos_args) {
29158         case  0:
29159         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root)) != 0)) kw_args--;
29160         else goto __pyx_L5_argtuple_error;
29161         CYTHON_FALLTHROUGH;
29162         case  1:
29163         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
29164         else {
29165           __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, 1); __PYX_ERR(1, 65, __pyx_L3_error)
29166         }
29167       }
29168       if (unlikely(kw_args > 0)) {
29169         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setattr") < 0)) __PYX_ERR(1, 65, __pyx_L3_error)
29170       }
29171     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
29172       goto __pyx_L5_argtuple_error;
29173     } else {
29174       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29175       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29176     }
29177     __pyx_v_root = ((struct LxmlElement *)values[0]);
29178     __pyx_v_value = values[1];
29179   }
29180   goto __pyx_L4_argument_unpacking_done;
29181   __pyx_L5_argtuple_error:;
29182   __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 65, __pyx_L3_error)
29183   __pyx_L3_error:;
29184   __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29185   __Pyx_RefNannyFinishContext();
29186   return NULL;
29187   __pyx_L4_argument_unpacking_done:;
29188   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) __PYX_ERR(1, 65, __pyx_L1_error)
29189   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_10setattr(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_root, __pyx_v_value);
29190
29191   /* function exit code */
29192   goto __pyx_L0;
29193   __pyx_L1_error:;
29194   __pyx_r = NULL;
29195   __pyx_L0:;
29196   __Pyx_RefNannyFinishContext();
29197   return __pyx_r;
29198 }
29199
29200 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) {
29201   PyObject *__pyx_r = NULL;
29202   __Pyx_RefNannyDeclarations
29203   PyObject *__pyx_t_1 = NULL;
29204   int __pyx_lineno = 0;
29205   const char *__pyx_filename = NULL;
29206   int __pyx_clineno = 0;
29207   __Pyx_RefNannySetupContext("setattr", 0);
29208
29209   /* "src/lxml/objectpath.pxi":72
29210  *         If any of the children on the path does not exist, it is created.
29211  *         """
29212  *         _create_object_path(root, self._c_path, self._path_len, 1, value)             # <<<<<<<<<<<<<<
29213  * 
29214  *     def addattr(self, _Element root not None, value):
29215  */
29216   __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)
29217   __Pyx_GOTREF(__pyx_t_1);
29218   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29219
29220   /* "src/lxml/objectpath.pxi":65
29221  *         return True
29222  * 
29223  *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
29224  *         u"""setattr(self, root, value)
29225  * 
29226  */
29227
29228   /* function exit code */
29229   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29230   goto __pyx_L0;
29231   __pyx_L1_error:;
29232   __Pyx_XDECREF(__pyx_t_1);
29233   __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29234   __pyx_r = NULL;
29235   __pyx_L0:;
29236   __Pyx_XGIVEREF(__pyx_r);
29237   __Pyx_RefNannyFinishContext();
29238   return __pyx_r;
29239 }
29240
29241 /* "src/lxml/objectpath.pxi":74
29242  *         _create_object_path(root, self._c_path, self._path_len, 1, value)
29243  * 
29244  *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
29245  *         u"""addattr(self, root, value)
29246  * 
29247  */
29248
29249 /* Python wrapper */
29250 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29251 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        ";
29252 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};
29253 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29254   struct LxmlElement *__pyx_v_root = 0;
29255   PyObject *__pyx_v_value = 0;
29256   int __pyx_lineno = 0;
29257   const char *__pyx_filename = NULL;
29258   int __pyx_clineno = 0;
29259   PyObject *__pyx_r = 0;
29260   __Pyx_RefNannyDeclarations
29261   __Pyx_RefNannySetupContext("addattr (wrapper)", 0);
29262   {
29263     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root,&__pyx_n_s_value,0};
29264     PyObject* values[2] = {0,0};
29265     if (unlikely(__pyx_kwds)) {
29266       Py_ssize_t kw_args;
29267       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29268       switch (pos_args) {
29269         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29270         CYTHON_FALLTHROUGH;
29271         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29272         CYTHON_FALLTHROUGH;
29273         case  0: break;
29274         default: goto __pyx_L5_argtuple_error;
29275       }
29276       kw_args = PyDict_Size(__pyx_kwds);
29277       switch (pos_args) {
29278         case  0:
29279         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root)) != 0)) kw_args--;
29280         else goto __pyx_L5_argtuple_error;
29281         CYTHON_FALLTHROUGH;
29282         case  1:
29283         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
29284         else {
29285           __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); __PYX_ERR(1, 74, __pyx_L3_error)
29286         }
29287       }
29288       if (unlikely(kw_args > 0)) {
29289         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addattr") < 0)) __PYX_ERR(1, 74, __pyx_L3_error)
29290       }
29291     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
29292       goto __pyx_L5_argtuple_error;
29293     } else {
29294       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29295       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29296     }
29297     __pyx_v_root = ((struct LxmlElement *)values[0]);
29298     __pyx_v_value = values[1];
29299   }
29300   goto __pyx_L4_argument_unpacking_done;
29301   __pyx_L5_argtuple_error:;
29302   __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 74, __pyx_L3_error)
29303   __pyx_L3_error:;
29304   __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29305   __Pyx_RefNannyFinishContext();
29306   return NULL;
29307   __pyx_L4_argument_unpacking_done:;
29308   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) __PYX_ERR(1, 74, __pyx_L1_error)
29309   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_12addattr(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_root, __pyx_v_value);
29310
29311   /* function exit code */
29312   goto __pyx_L0;
29313   __pyx_L1_error:;
29314   __pyx_r = NULL;
29315   __pyx_L0:;
29316   __Pyx_RefNannyFinishContext();
29317   return __pyx_r;
29318 }
29319
29320 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) {
29321   PyObject *__pyx_r = NULL;
29322   __Pyx_RefNannyDeclarations
29323   PyObject *__pyx_t_1 = NULL;
29324   int __pyx_lineno = 0;
29325   const char *__pyx_filename = NULL;
29326   int __pyx_clineno = 0;
29327   __Pyx_RefNannySetupContext("addattr", 0);
29328
29329   /* "src/lxml/objectpath.pxi":81
29330  *         If any of the children on the path does not exist, it is created.
29331  *         """
29332  *         _create_object_path(root, self._c_path, self._path_len, 0, value)             # <<<<<<<<<<<<<<
29333  * 
29334  * 
29335  */
29336   __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)
29337   __Pyx_GOTREF(__pyx_t_1);
29338   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29339
29340   /* "src/lxml/objectpath.pxi":74
29341  *         _create_object_path(root, self._c_path, self._path_len, 1, value)
29342  * 
29343  *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
29344  *         u"""addattr(self, root, value)
29345  * 
29346  */
29347
29348   /* function exit code */
29349   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29350   goto __pyx_L0;
29351   __pyx_L1_error:;
29352   __Pyx_XDECREF(__pyx_t_1);
29353   __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29354   __pyx_r = NULL;
29355   __pyx_L0:;
29356   __Pyx_XGIVEREF(__pyx_r);
29357   __Pyx_RefNannyFinishContext();
29358   return __pyx_r;
29359 }
29360
29361 /* "src/lxml/objectpath.pxi":19
29362  *     Example for a path: 'root.child[1].{other}child[25]'
29363  *     """
29364  *     cdef readonly object find             # <<<<<<<<<<<<<<
29365  *     cdef list _path
29366  *     cdef object _path_str
29367  */
29368
29369 /* Python wrapper */
29370 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_4find_1__get__(PyObject *__pyx_v_self); /*proto*/
29371 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_4find_1__get__(PyObject *__pyx_v_self) {
29372   PyObject *__pyx_r = 0;
29373   __Pyx_RefNannyDeclarations
29374   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29375   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_4find___get__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self));
29376
29377   /* function exit code */
29378   __Pyx_RefNannyFinishContext();
29379   return __pyx_r;
29380 }
29381
29382 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4find___get__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self) {
29383   PyObject *__pyx_r = NULL;
29384   __Pyx_RefNannyDeclarations
29385   __Pyx_RefNannySetupContext("__get__", 0);
29386   __Pyx_XDECREF(__pyx_r);
29387   __Pyx_INCREF(__pyx_v_self->find);
29388   __pyx_r = __pyx_v_self->find;
29389   goto __pyx_L0;
29390
29391   /* function exit code */
29392   __pyx_L0:;
29393   __Pyx_XGIVEREF(__pyx_r);
29394   __Pyx_RefNannyFinishContext();
29395   return __pyx_r;
29396 }
29397
29398 /* "src/lxml/objectpath.pxi":91
29399  * 
29400  * 
29401  * cdef list _parse_object_path_string(_path):             # <<<<<<<<<<<<<<
29402  *     u"""Parse object path string into a (ns, name, index) list.
29403  *     """
29404  */
29405
29406 static PyObject *__pyx_f_4lxml_9objectify__parse_object_path_string(PyObject *__pyx_v__path) {
29407   int __pyx_v_has_dot;
29408   PyObject *__pyx_v_path = 0;
29409   PyObject *__pyx_v_new_path = NULL;
29410   PyObject *__pyx_v_path_pos = NULL;
29411   PyObject *__pyx_v_match = NULL;
29412   PyObject *__pyx_v_dot = NULL;
29413   PyObject *__pyx_v_ns = NULL;
29414   PyObject *__pyx_v_name = NULL;
29415   PyObject *__pyx_v_index = NULL;
29416   PyObject *__pyx_r = NULL;
29417   __Pyx_RefNannyDeclarations
29418   PyObject *__pyx_t_1 = NULL;
29419   int __pyx_t_2;
29420   int __pyx_t_3;
29421   PyObject *__pyx_t_4 = NULL;
29422   PyObject *__pyx_t_5 = NULL;
29423   int __pyx_t_6;
29424   PyObject *__pyx_t_7 = NULL;
29425   PyObject *__pyx_t_8 = NULL;
29426   PyObject *__pyx_t_9 = NULL;
29427   PyObject *(*__pyx_t_10)(PyObject *);
29428   int __pyx_t_11;
29429   int __pyx_t_12;
29430   Py_ssize_t __pyx_t_13;
29431   int __pyx_lineno = 0;
29432   const char *__pyx_filename = NULL;
29433   int __pyx_clineno = 0;
29434   __Pyx_RefNannySetupContext("_parse_object_path_string", 0);
29435
29436   /* "src/lxml/objectpath.pxi":96
29437  *     cdef bint has_dot
29438  *     cdef unicode path
29439  *     new_path = []             # <<<<<<<<<<<<<<
29440  *     if isinstance(_path, bytes):
29441  *         path = (<bytes>_path).decode('ascii')
29442  */
29443   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 96, __pyx_L1_error)
29444   __Pyx_GOTREF(__pyx_t_1);
29445   __pyx_v_new_path = ((PyObject*)__pyx_t_1);
29446   __pyx_t_1 = 0;
29447
29448   /* "src/lxml/objectpath.pxi":97
29449  *     cdef unicode path
29450  *     new_path = []
29451  *     if isinstance(_path, bytes):             # <<<<<<<<<<<<<<
29452  *         path = (<bytes>_path).decode('ascii')
29453  *     elif type(_path) is not unicode:
29454  */
29455   __pyx_t_2 = PyBytes_Check(__pyx_v__path); 
29456   __pyx_t_3 = (__pyx_t_2 != 0);
29457   if (__pyx_t_3) {
29458
29459     /* "src/lxml/objectpath.pxi":98
29460  *     new_path = []
29461  *     if isinstance(_path, bytes):
29462  *         path = (<bytes>_path).decode('ascii')             # <<<<<<<<<<<<<<
29463  *     elif type(_path) is not unicode:
29464  *         path = unicode(_path)
29465  */
29466     if (unlikely(__pyx_v__path == Py_None)) {
29467       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
29468       __PYX_ERR(1, 98, __pyx_L1_error)
29469     }
29470     __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)
29471     __Pyx_GOTREF(__pyx_t_1);
29472     __pyx_v_path = ((PyObject*)__pyx_t_1);
29473     __pyx_t_1 = 0;
29474
29475     /* "src/lxml/objectpath.pxi":97
29476  *     cdef unicode path
29477  *     new_path = []
29478  *     if isinstance(_path, bytes):             # <<<<<<<<<<<<<<
29479  *         path = (<bytes>_path).decode('ascii')
29480  *     elif type(_path) is not unicode:
29481  */
29482     goto __pyx_L3;
29483   }
29484
29485   /* "src/lxml/objectpath.pxi":99
29486  *     if isinstance(_path, bytes):
29487  *         path = (<bytes>_path).decode('ascii')
29488  *     elif type(_path) is not unicode:             # <<<<<<<<<<<<<<
29489  *         path = unicode(_path)
29490  *     else:
29491  */
29492   __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v__path)) != ((PyObject *)(&PyUnicode_Type)));
29493   __pyx_t_2 = (__pyx_t_3 != 0);
29494   if (__pyx_t_2) {
29495
29496     /* "src/lxml/objectpath.pxi":100
29497  *         path = (<bytes>_path).decode('ascii')
29498  *     elif type(_path) is not unicode:
29499  *         path = unicode(_path)             # <<<<<<<<<<<<<<
29500  *     else:
29501  *         path = _path
29502  */
29503     __pyx_t_1 = __Pyx_PyObject_Unicode(__pyx_v__path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 100, __pyx_L1_error)
29504     __Pyx_GOTREF(__pyx_t_1);
29505     __pyx_v_path = ((PyObject*)__pyx_t_1);
29506     __pyx_t_1 = 0;
29507
29508     /* "src/lxml/objectpath.pxi":99
29509  *     if isinstance(_path, bytes):
29510  *         path = (<bytes>_path).decode('ascii')
29511  *     elif type(_path) is not unicode:             # <<<<<<<<<<<<<<
29512  *         path = unicode(_path)
29513  *     else:
29514  */
29515     goto __pyx_L3;
29516   }
29517
29518   /* "src/lxml/objectpath.pxi":102
29519  *         path = unicode(_path)
29520  *     else:
29521  *         path = _path             # <<<<<<<<<<<<<<
29522  *     path = path.strip()
29523  *     if path == u'.':
29524  */
29525   /*else*/ {
29526     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)
29527     __pyx_t_1 = __pyx_v__path;
29528     __Pyx_INCREF(__pyx_t_1);
29529     __pyx_v_path = ((PyObject*)__pyx_t_1);
29530     __pyx_t_1 = 0;
29531   }
29532   __pyx_L3:;
29533
29534   /* "src/lxml/objectpath.pxi":103
29535  *     else:
29536  *         path = _path
29537  *     path = path.strip()             # <<<<<<<<<<<<<<
29538  *     if path == u'.':
29539  *         return [_RELATIVE_PATH_SEGMENT]
29540  */
29541   __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)
29542   __Pyx_GOTREF(__pyx_t_1);
29543   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)
29544   __Pyx_DECREF_SET(__pyx_v_path, ((PyObject*)__pyx_t_1));
29545   __pyx_t_1 = 0;
29546
29547   /* "src/lxml/objectpath.pxi":104
29548  *         path = _path
29549  *     path = path.strip()
29550  *     if path == u'.':             # <<<<<<<<<<<<<<
29551  *         return [_RELATIVE_PATH_SEGMENT]
29552  *     path_pos = 0
29553  */
29554   __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)
29555   __pyx_t_3 = (__pyx_t_2 != 0);
29556   if (__pyx_t_3) {
29557
29558     /* "src/lxml/objectpath.pxi":105
29559  *     path = path.strip()
29560  *     if path == u'.':
29561  *         return [_RELATIVE_PATH_SEGMENT]             # <<<<<<<<<<<<<<
29562  *     path_pos = 0
29563  *     while path:
29564  */
29565     __Pyx_XDECREF(__pyx_r);
29566     __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 105, __pyx_L1_error)
29567     __Pyx_GOTREF(__pyx_t_1);
29568     __Pyx_INCREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
29569     __Pyx_GIVEREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
29570     PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
29571     __pyx_r = ((PyObject*)__pyx_t_1);
29572     __pyx_t_1 = 0;
29573     goto __pyx_L0;
29574
29575     /* "src/lxml/objectpath.pxi":104
29576  *         path = _path
29577  *     path = path.strip()
29578  *     if path == u'.':             # <<<<<<<<<<<<<<
29579  *         return [_RELATIVE_PATH_SEGMENT]
29580  *     path_pos = 0
29581  */
29582   }
29583
29584   /* "src/lxml/objectpath.pxi":106
29585  *     if path == u'.':
29586  *         return [_RELATIVE_PATH_SEGMENT]
29587  *     path_pos = 0             # <<<<<<<<<<<<<<
29588  *     while path:
29589  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29590  */
29591   __Pyx_INCREF(__pyx_int_0);
29592   __pyx_v_path_pos = __pyx_int_0;
29593
29594   /* "src/lxml/objectpath.pxi":107
29595  *         return [_RELATIVE_PATH_SEGMENT]
29596  *     path_pos = 0
29597  *     while path:             # <<<<<<<<<<<<<<
29598  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29599  *         if match is None:
29600  */
29601   while (1) {
29602     __pyx_t_3 = (__pyx_v_path != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_path) != 0);
29603     if (!__pyx_t_3) break;
29604
29605     /* "src/lxml/objectpath.pxi":108
29606  *     path_pos = 0
29607  *     while path:
29608  *         match = __MATCH_PATH_SEGMENT(path, path_pos)             # <<<<<<<<<<<<<<
29609  *         if match is None:
29610  *             break
29611  */
29612     __Pyx_INCREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
29613     __pyx_t_4 = __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT; __pyx_t_5 = NULL;
29614     __pyx_t_6 = 0;
29615     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
29616       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
29617       if (likely(__pyx_t_5)) {
29618         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
29619         __Pyx_INCREF(__pyx_t_5);
29620         __Pyx_INCREF(function);
29621         __Pyx_DECREF_SET(__pyx_t_4, function);
29622         __pyx_t_6 = 1;
29623       }
29624     }
29625     #if CYTHON_FAST_PYCALL
29626     if (PyFunction_Check(__pyx_t_4)) {
29627       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_path, __pyx_v_path_pos};
29628       __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)
29629       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
29630       __Pyx_GOTREF(__pyx_t_1);
29631     } else
29632     #endif
29633     #if CYTHON_FAST_PYCCALL
29634     if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
29635       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_path, __pyx_v_path_pos};
29636       __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)
29637       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
29638       __Pyx_GOTREF(__pyx_t_1);
29639     } else
29640     #endif
29641     {
29642       __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 108, __pyx_L1_error)
29643       __Pyx_GOTREF(__pyx_t_7);
29644       if (__pyx_t_5) {
29645         __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
29646       }
29647       __Pyx_INCREF(__pyx_v_path);
29648       __Pyx_GIVEREF(__pyx_v_path);
29649       PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_path);
29650       __Pyx_INCREF(__pyx_v_path_pos);
29651       __Pyx_GIVEREF(__pyx_v_path_pos);
29652       PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_path_pos);
29653       __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)
29654       __Pyx_GOTREF(__pyx_t_1);
29655       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
29656     }
29657     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29658     __Pyx_XDECREF_SET(__pyx_v_match, __pyx_t_1);
29659     __pyx_t_1 = 0;
29660
29661     /* "src/lxml/objectpath.pxi":109
29662  *     while path:
29663  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29664  *         if match is None:             # <<<<<<<<<<<<<<
29665  *             break
29666  * 
29667  */
29668     __pyx_t_3 = (__pyx_v_match == Py_None);
29669     __pyx_t_2 = (__pyx_t_3 != 0);
29670     if (__pyx_t_2) {
29671
29672       /* "src/lxml/objectpath.pxi":110
29673  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29674  *         if match is None:
29675  *             break             # <<<<<<<<<<<<<<
29676  * 
29677  *         dot, ns, name, index = match.groups()
29678  */
29679       goto __pyx_L6_break;
29680
29681       /* "src/lxml/objectpath.pxi":109
29682  *     while path:
29683  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29684  *         if match is None:             # <<<<<<<<<<<<<<
29685  *             break
29686  * 
29687  */
29688     }
29689
29690     /* "src/lxml/objectpath.pxi":112
29691  *             break
29692  * 
29693  *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<<
29694  *         index = int(index) if index else 0
29695  *         has_dot = dot == u'.'
29696  */
29697     __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)
29698     __Pyx_GOTREF(__pyx_t_4);
29699     __pyx_t_7 = NULL;
29700     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
29701       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
29702       if (likely(__pyx_t_7)) {
29703         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
29704         __Pyx_INCREF(__pyx_t_7);
29705         __Pyx_INCREF(function);
29706         __Pyx_DECREF_SET(__pyx_t_4, function);
29707       }
29708     }
29709     __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
29710     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
29711     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 112, __pyx_L1_error)
29712     __Pyx_GOTREF(__pyx_t_1);
29713     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29714     if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
29715       PyObject* sequence = __pyx_t_1;
29716       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
29717       if (unlikely(size != 4)) {
29718         if (size > 4) __Pyx_RaiseTooManyValuesError(4);
29719         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
29720         __PYX_ERR(1, 112, __pyx_L1_error)
29721       }
29722       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
29723       if (likely(PyTuple_CheckExact(sequence))) {
29724         __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
29725         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
29726         __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
29727         __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); 
29728       } else {
29729         __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
29730         __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
29731         __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
29732         __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
29733       }
29734       __Pyx_INCREF(__pyx_t_4);
29735       __Pyx_INCREF(__pyx_t_7);
29736       __Pyx_INCREF(__pyx_t_5);
29737       __Pyx_INCREF(__pyx_t_8);
29738       #else
29739       {
29740         Py_ssize_t i;
29741         PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_7,&__pyx_t_5,&__pyx_t_8};
29742         for (i=0; i < 4; i++) {
29743           PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(1, 112, __pyx_L1_error)
29744           __Pyx_GOTREF(item);
29745           *(temps[i]) = item;
29746         }
29747       }
29748       #endif
29749       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29750     } else {
29751       Py_ssize_t index = -1;
29752       PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_7,&__pyx_t_5,&__pyx_t_8};
29753       __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 112, __pyx_L1_error)
29754       __Pyx_GOTREF(__pyx_t_9);
29755       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29756       __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
29757       for (index=0; index < 4; index++) {
29758         PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L8_unpacking_failed;
29759         __Pyx_GOTREF(item);
29760         *(temps[index]) = item;
29761       }
29762       if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 4) < 0) __PYX_ERR(1, 112, __pyx_L1_error)
29763       __pyx_t_10 = NULL;
29764       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29765       goto __pyx_L9_unpacking_done;
29766       __pyx_L8_unpacking_failed:;
29767       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29768       __pyx_t_10 = NULL;
29769       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
29770       __PYX_ERR(1, 112, __pyx_L1_error)
29771       __pyx_L9_unpacking_done:;
29772     }
29773     __Pyx_XDECREF_SET(__pyx_v_dot, __pyx_t_4);
29774     __pyx_t_4 = 0;
29775     __Pyx_XDECREF_SET(__pyx_v_ns, __pyx_t_7);
29776     __pyx_t_7 = 0;
29777     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
29778     __pyx_t_5 = 0;
29779     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
29780     __pyx_t_8 = 0;
29781
29782     /* "src/lxml/objectpath.pxi":113
29783  * 
29784  *         dot, ns, name, index = match.groups()
29785  *         index = int(index) if index else 0             # <<<<<<<<<<<<<<
29786  *         has_dot = dot == u'.'
29787  *         if not new_path:
29788  */
29789     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 113, __pyx_L1_error)
29790     if (__pyx_t_2) {
29791       __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_v_index); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 113, __pyx_L1_error)
29792       __Pyx_GOTREF(__pyx_t_8);
29793       __pyx_t_1 = __pyx_t_8;
29794       __pyx_t_8 = 0;
29795     } else {
29796       __Pyx_INCREF(__pyx_int_0);
29797       __pyx_t_1 = __pyx_int_0;
29798     }
29799     __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1);
29800     __pyx_t_1 = 0;
29801
29802     /* "src/lxml/objectpath.pxi":114
29803  *         dot, ns, name, index = match.groups()
29804  *         index = int(index) if index else 0
29805  *         has_dot = dot == u'.'             # <<<<<<<<<<<<<<
29806  *         if not new_path:
29807  *             if has_dot:
29808  */
29809     __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)
29810     __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)
29811     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29812     __pyx_v_has_dot = __pyx_t_2;
29813
29814     /* "src/lxml/objectpath.pxi":115
29815  *         index = int(index) if index else 0
29816  *         has_dot = dot == u'.'
29817  *         if not new_path:             # <<<<<<<<<<<<<<
29818  *             if has_dot:
29819  *                 # path '.child' => ignore root
29820  */
29821     __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
29822     __pyx_t_3 = ((!__pyx_t_2) != 0);
29823     if (__pyx_t_3) {
29824
29825       /* "src/lxml/objectpath.pxi":116
29826  *         has_dot = dot == u'.'
29827  *         if not new_path:
29828  *             if has_dot:             # <<<<<<<<<<<<<<
29829  *                 # path '.child' => ignore root
29830  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
29831  */
29832       __pyx_t_3 = (__pyx_v_has_dot != 0);
29833       if (__pyx_t_3) {
29834
29835         /* "src/lxml/objectpath.pxi":118
29836  *             if has_dot:
29837  *                 # path '.child' => ignore root
29838  *                 new_path.append(_RELATIVE_PATH_SEGMENT)             # <<<<<<<<<<<<<<
29839  *             elif index:
29840  *                 raise ValueError, u"index not allowed on root node"
29841  */
29842         __pyx_t_1 = __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT;
29843         __Pyx_INCREF(__pyx_t_1);
29844         __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)
29845         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29846
29847         /* "src/lxml/objectpath.pxi":116
29848  *         has_dot = dot == u'.'
29849  *         if not new_path:
29850  *             if has_dot:             # <<<<<<<<<<<<<<
29851  *                 # path '.child' => ignore root
29852  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
29853  */
29854         goto __pyx_L11;
29855       }
29856
29857       /* "src/lxml/objectpath.pxi":119
29858  *                 # path '.child' => ignore root
29859  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
29860  *             elif index:             # <<<<<<<<<<<<<<
29861  *                 raise ValueError, u"index not allowed on root node"
29862  *         elif not has_dot:
29863  */
29864       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 119, __pyx_L1_error)
29865       if (unlikely(__pyx_t_3)) {
29866
29867         /* "src/lxml/objectpath.pxi":120
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  *             raise ValueError, u"invalid path"
29873  */
29874         __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_index_not_allowed_on_root_node, 0, 0);
29875         __PYX_ERR(1, 120, __pyx_L1_error)
29876
29877         /* "src/lxml/objectpath.pxi":119
29878  *                 # path '.child' => ignore root
29879  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
29880  *             elif index:             # <<<<<<<<<<<<<<
29881  *                 raise ValueError, u"index not allowed on root node"
29882  *         elif not has_dot:
29883  */
29884       }
29885       __pyx_L11:;
29886
29887       /* "src/lxml/objectpath.pxi":115
29888  *         index = int(index) if index else 0
29889  *         has_dot = dot == u'.'
29890  *         if not new_path:             # <<<<<<<<<<<<<<
29891  *             if has_dot:
29892  *                 # path '.child' => ignore root
29893  */
29894       goto __pyx_L10;
29895     }
29896
29897     /* "src/lxml/objectpath.pxi":121
29898  *             elif index:
29899  *                 raise ValueError, u"index not allowed on root node"
29900  *         elif not has_dot:             # <<<<<<<<<<<<<<
29901  *             raise ValueError, u"invalid path"
29902  *         if ns is not None:
29903  */
29904     __pyx_t_3 = ((!(__pyx_v_has_dot != 0)) != 0);
29905     if (unlikely(__pyx_t_3)) {
29906
29907       /* "src/lxml/objectpath.pxi":122
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  *             ns = python.PyUnicode_AsUTF8String(ns)
29913  */
29914       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_invalid_path, 0, 0);
29915       __PYX_ERR(1, 122, __pyx_L1_error)
29916
29917       /* "src/lxml/objectpath.pxi":121
29918  *             elif index:
29919  *                 raise ValueError, u"index not allowed on root node"
29920  *         elif not has_dot:             # <<<<<<<<<<<<<<
29921  *             raise ValueError, u"invalid path"
29922  *         if ns is not None:
29923  */
29924     }
29925     __pyx_L10:;
29926
29927     /* "src/lxml/objectpath.pxi":123
29928  *         elif not has_dot:
29929  *             raise ValueError, u"invalid path"
29930  *         if ns is not None:             # <<<<<<<<<<<<<<
29931  *             ns = python.PyUnicode_AsUTF8String(ns)
29932  *         name = python.PyUnicode_AsUTF8String(name)
29933  */
29934     __pyx_t_3 = (__pyx_v_ns != Py_None);
29935     __pyx_t_2 = (__pyx_t_3 != 0);
29936     if (__pyx_t_2) {
29937
29938       /* "src/lxml/objectpath.pxi":124
29939  *             raise ValueError, u"invalid path"
29940  *         if ns is not None:
29941  *             ns = python.PyUnicode_AsUTF8String(ns)             # <<<<<<<<<<<<<<
29942  *         name = python.PyUnicode_AsUTF8String(name)
29943  *         new_path.append( (ns, name, index) )
29944  */
29945       __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_ns); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 124, __pyx_L1_error)
29946       __Pyx_GOTREF(__pyx_t_1);
29947       __Pyx_DECREF_SET(__pyx_v_ns, __pyx_t_1);
29948       __pyx_t_1 = 0;
29949
29950       /* "src/lxml/objectpath.pxi":123
29951  *         elif not has_dot:
29952  *             raise ValueError, u"invalid path"
29953  *         if ns is not None:             # <<<<<<<<<<<<<<
29954  *             ns = python.PyUnicode_AsUTF8String(ns)
29955  *         name = python.PyUnicode_AsUTF8String(name)
29956  */
29957     }
29958
29959     /* "src/lxml/objectpath.pxi":125
29960  *         if ns is not None:
29961  *             ns = python.PyUnicode_AsUTF8String(ns)
29962  *         name = python.PyUnicode_AsUTF8String(name)             # <<<<<<<<<<<<<<
29963  *         new_path.append( (ns, name, index) )
29964  * 
29965  */
29966     __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 125, __pyx_L1_error)
29967     __Pyx_GOTREF(__pyx_t_1);
29968     __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
29969     __pyx_t_1 = 0;
29970
29971     /* "src/lxml/objectpath.pxi":126
29972  *             ns = python.PyUnicode_AsUTF8String(ns)
29973  *         name = python.PyUnicode_AsUTF8String(name)
29974  *         new_path.append( (ns, name, index) )             # <<<<<<<<<<<<<<
29975  * 
29976  *         path_pos = match.end()
29977  */
29978     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 126, __pyx_L1_error)
29979     __Pyx_GOTREF(__pyx_t_1);
29980     __Pyx_INCREF(__pyx_v_ns);
29981     __Pyx_GIVEREF(__pyx_v_ns);
29982     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ns);
29983     __Pyx_INCREF(__pyx_v_name);
29984     __Pyx_GIVEREF(__pyx_v_name);
29985     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
29986     __Pyx_INCREF(__pyx_v_index);
29987     __Pyx_GIVEREF(__pyx_v_index);
29988     PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_index);
29989     __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)
29990     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29991
29992     /* "src/lxml/objectpath.pxi":128
29993  *         new_path.append( (ns, name, index) )
29994  * 
29995  *         path_pos = match.end()             # <<<<<<<<<<<<<<
29996  *     if not new_path or len(path) > path_pos:
29997  *         raise ValueError, u"invalid path"
29998  */
29999     __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)
30000     __Pyx_GOTREF(__pyx_t_8);
30001     __pyx_t_5 = NULL;
30002     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
30003       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
30004       if (likely(__pyx_t_5)) {
30005         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
30006         __Pyx_INCREF(__pyx_t_5);
30007         __Pyx_INCREF(function);
30008         __Pyx_DECREF_SET(__pyx_t_8, function);
30009       }
30010     }
30011     __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
30012     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30013     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 128, __pyx_L1_error)
30014     __Pyx_GOTREF(__pyx_t_1);
30015     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
30016     __Pyx_DECREF_SET(__pyx_v_path_pos, __pyx_t_1);
30017     __pyx_t_1 = 0;
30018   }
30019   __pyx_L6_break:;
30020
30021   /* "src/lxml/objectpath.pxi":129
30022  * 
30023  *         path_pos = match.end()
30024  *     if not new_path or len(path) > path_pos:             # <<<<<<<<<<<<<<
30025  *         raise ValueError, u"invalid path"
30026  *     return new_path
30027  */
30028   __pyx_t_3 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
30029   __pyx_t_12 = ((!__pyx_t_3) != 0);
30030   if (!__pyx_t_12) {
30031   } else {
30032     __pyx_t_2 = __pyx_t_12;
30033     goto __pyx_L14_bool_binop_done;
30034   }
30035   if (unlikely(__pyx_v_path == Py_None)) {
30036     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
30037     __PYX_ERR(1, 129, __pyx_L1_error)
30038   }
30039   __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)
30040   __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
30041   __Pyx_GOTREF(__pyx_t_1);
30042   __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)
30043   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30044   __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(1, 129, __pyx_L1_error)
30045   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
30046   __pyx_t_2 = __pyx_t_12;
30047   __pyx_L14_bool_binop_done:;
30048   if (unlikely(__pyx_t_2)) {
30049
30050     /* "src/lxml/objectpath.pxi":130
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     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_invalid_path, 0, 0);
30058     __PYX_ERR(1, 130, __pyx_L1_error)
30059
30060     /* "src/lxml/objectpath.pxi":129
30061  * 
30062  *         path_pos = match.end()
30063  *     if not new_path or len(path) > path_pos:             # <<<<<<<<<<<<<<
30064  *         raise ValueError, u"invalid path"
30065  *     return new_path
30066  */
30067   }
30068
30069   /* "src/lxml/objectpath.pxi":131
30070  *     if not new_path or len(path) > path_pos:
30071  *         raise ValueError, u"invalid path"
30072  *     return new_path             # <<<<<<<<<<<<<<
30073  * 
30074  * 
30075  */
30076   __Pyx_XDECREF(__pyx_r);
30077   __Pyx_INCREF(__pyx_v_new_path);
30078   __pyx_r = __pyx_v_new_path;
30079   goto __pyx_L0;
30080
30081   /* "src/lxml/objectpath.pxi":91
30082  * 
30083  * 
30084  * cdef list _parse_object_path_string(_path):             # <<<<<<<<<<<<<<
30085  *     u"""Parse object path string into a (ns, name, index) list.
30086  *     """
30087  */
30088
30089   /* function exit code */
30090   __pyx_L1_error:;
30091   __Pyx_XDECREF(__pyx_t_1);
30092   __Pyx_XDECREF(__pyx_t_4);
30093   __Pyx_XDECREF(__pyx_t_5);
30094   __Pyx_XDECREF(__pyx_t_7);
30095   __Pyx_XDECREF(__pyx_t_8);
30096   __Pyx_XDECREF(__pyx_t_9);
30097   __Pyx_AddTraceback("lxml.objectify._parse_object_path_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
30098   __pyx_r = 0;
30099   __pyx_L0:;
30100   __Pyx_XDECREF(__pyx_v_path);
30101   __Pyx_XDECREF(__pyx_v_new_path);
30102   __Pyx_XDECREF(__pyx_v_path_pos);
30103   __Pyx_XDECREF(__pyx_v_match);
30104   __Pyx_XDECREF(__pyx_v_dot);
30105   __Pyx_XDECREF(__pyx_v_ns);
30106   __Pyx_XDECREF(__pyx_v_name);
30107   __Pyx_XDECREF(__pyx_v_index);
30108   __Pyx_XGIVEREF(__pyx_r);
30109   __Pyx_RefNannyFinishContext();
30110   return __pyx_r;
30111 }
30112
30113 /* "src/lxml/objectpath.pxi":134
30114  * 
30115  * 
30116  * cdef list _parse_object_path_list(path):             # <<<<<<<<<<<<<<
30117  *     u"""Parse object path sequence into a (ns, name, index) list.
30118  *     """
30119  */
30120
30121 static PyObject *__pyx_f_4lxml_9objectify__parse_object_path_list(PyObject *__pyx_v_path) {
30122   PyObject *__pyx_v_new_path = NULL;
30123   PyObject *__pyx_v_item = NULL;
30124   PyObject *__pyx_v_ns = NULL;
30125   PyObject *__pyx_v_name = NULL;
30126   PyObject *__pyx_v_index = NULL;
30127   const xmlChar *__pyx_v_c_name;
30128   const xmlChar *__pyx_v_index_pos;
30129   const xmlChar *__pyx_v_index_end;
30130   PyObject *__pyx_r = NULL;
30131   __Pyx_RefNannyDeclarations
30132   PyObject *__pyx_t_1 = NULL;
30133   Py_ssize_t __pyx_t_2;
30134   PyObject *(*__pyx_t_3)(PyObject *);
30135   PyObject *__pyx_t_4 = NULL;
30136   PyObject *__pyx_t_5 = NULL;
30137   PyObject *__pyx_t_6 = NULL;
30138   int __pyx_t_7;
30139   int __pyx_t_8;
30140   int __pyx_t_9;
30141   int __pyx_t_10;
30142   int __pyx_lineno = 0;
30143   const char *__pyx_filename = NULL;
30144   int __pyx_clineno = 0;
30145   __Pyx_RefNannySetupContext("_parse_object_path_list", 0);
30146
30147   /* "src/lxml/objectpath.pxi":137
30148  *     u"""Parse object path sequence into a (ns, name, index) list.
30149  *     """
30150  *     new_path = []             # <<<<<<<<<<<<<<
30151  *     for item in path:
30152  *         item = item.strip()
30153  */
30154   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 137, __pyx_L1_error)
30155   __Pyx_GOTREF(__pyx_t_1);
30156   __pyx_v_new_path = ((PyObject*)__pyx_t_1);
30157   __pyx_t_1 = 0;
30158
30159   /* "src/lxml/objectpath.pxi":138
30160  *     """
30161  *     new_path = []
30162  *     for item in path:             # <<<<<<<<<<<<<<
30163  *         item = item.strip()
30164  *         if not new_path and item == u'':
30165  */
30166   if (likely(PyList_CheckExact(__pyx_v_path)) || PyTuple_CheckExact(__pyx_v_path)) {
30167     __pyx_t_1 = __pyx_v_path; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
30168     __pyx_t_3 = NULL;
30169   } else {
30170     __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 138, __pyx_L1_error)
30171     __Pyx_GOTREF(__pyx_t_1);
30172     __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 138, __pyx_L1_error)
30173   }
30174   for (;;) {
30175     if (likely(!__pyx_t_3)) {
30176       if (likely(PyList_CheckExact(__pyx_t_1))) {
30177         if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
30178         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30179         __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)
30180         #else
30181         __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)
30182         __Pyx_GOTREF(__pyx_t_4);
30183         #endif
30184       } else {
30185         if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
30186         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30187         __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)
30188         #else
30189         __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)
30190         __Pyx_GOTREF(__pyx_t_4);
30191         #endif
30192       }
30193     } else {
30194       __pyx_t_4 = __pyx_t_3(__pyx_t_1);
30195       if (unlikely(!__pyx_t_4)) {
30196         PyObject* exc_type = PyErr_Occurred();
30197         if (exc_type) {
30198           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
30199           else __PYX_ERR(1, 138, __pyx_L1_error)
30200         }
30201         break;
30202       }
30203       __Pyx_GOTREF(__pyx_t_4);
30204     }
30205     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
30206     __pyx_t_4 = 0;
30207
30208     /* "src/lxml/objectpath.pxi":139
30209  *     new_path = []
30210  *     for item in path:
30211  *         item = item.strip()             # <<<<<<<<<<<<<<
30212  *         if not new_path and item == u'':
30213  *             # path '.child' => ignore root
30214  */
30215     __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)
30216     __Pyx_GOTREF(__pyx_t_5);
30217     __pyx_t_6 = NULL;
30218     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
30219       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
30220       if (likely(__pyx_t_6)) {
30221         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
30222         __Pyx_INCREF(__pyx_t_6);
30223         __Pyx_INCREF(function);
30224         __Pyx_DECREF_SET(__pyx_t_5, function);
30225       }
30226     }
30227     __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
30228     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
30229     if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 139, __pyx_L1_error)
30230     __Pyx_GOTREF(__pyx_t_4);
30231     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30232     __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_4);
30233     __pyx_t_4 = 0;
30234
30235     /* "src/lxml/objectpath.pxi":140
30236  *     for item in path:
30237  *         item = item.strip()
30238  *         if not new_path and item == u'':             # <<<<<<<<<<<<<<
30239  *             # path '.child' => ignore root
30240  *             ns = name = None
30241  */
30242     __pyx_t_8 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
30243     __pyx_t_9 = ((!__pyx_t_8) != 0);
30244     if (__pyx_t_9) {
30245     } else {
30246       __pyx_t_7 = __pyx_t_9;
30247       goto __pyx_L6_bool_binop_done;
30248     }
30249     __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)
30250     __pyx_t_7 = __pyx_t_9;
30251     __pyx_L6_bool_binop_done:;
30252     if (__pyx_t_7) {
30253
30254       /* "src/lxml/objectpath.pxi":142
30255  *         if not new_path and item == u'':
30256  *             # path '.child' => ignore root
30257  *             ns = name = None             # <<<<<<<<<<<<<<
30258  *             index = 0
30259  *         else:
30260  */
30261       __Pyx_INCREF(Py_None);
30262       __Pyx_XDECREF_SET(__pyx_v_ns, Py_None);
30263       __Pyx_INCREF(Py_None);
30264       __Pyx_XDECREF_SET(__pyx_v_name, Py_None);
30265
30266       /* "src/lxml/objectpath.pxi":143
30267  *             # path '.child' => ignore root
30268  *             ns = name = None
30269  *             index = 0             # <<<<<<<<<<<<<<
30270  *         else:
30271  *             ns, name = cetree.getNsTag(item)
30272  */
30273       __Pyx_INCREF(__pyx_int_0);
30274       __Pyx_XDECREF_SET(__pyx_v_index, __pyx_int_0);
30275
30276       /* "src/lxml/objectpath.pxi":140
30277  *     for item in path:
30278  *         item = item.strip()
30279  *         if not new_path and item == u'':             # <<<<<<<<<<<<<<
30280  *             # path '.child' => ignore root
30281  *             ns = name = None
30282  */
30283       goto __pyx_L5;
30284     }
30285
30286     /* "src/lxml/objectpath.pxi":145
30287  *             index = 0
30288  *         else:
30289  *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<<
30290  *             c_name = _xcstr(name)
30291  *             index_pos = tree.xmlStrchr(c_name, c'[')
30292  */
30293     /*else*/ {
30294       __pyx_t_4 = getNsTag(__pyx_v_item); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 145, __pyx_L1_error)
30295       __Pyx_GOTREF(__pyx_t_4);
30296       if (likely(__pyx_t_4 != Py_None)) {
30297         PyObject* sequence = __pyx_t_4;
30298         Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
30299         if (unlikely(size != 2)) {
30300           if (size > 2) __Pyx_RaiseTooManyValuesError(2);
30301           else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
30302           __PYX_ERR(1, 145, __pyx_L1_error)
30303         }
30304         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30305         __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
30306         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
30307         __Pyx_INCREF(__pyx_t_5);
30308         __Pyx_INCREF(__pyx_t_6);
30309         #else
30310         __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 145, __pyx_L1_error)
30311         __Pyx_GOTREF(__pyx_t_5);
30312         __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 145, __pyx_L1_error)
30313         __Pyx_GOTREF(__pyx_t_6);
30314         #endif
30315         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30316       } else {
30317         __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 145, __pyx_L1_error)
30318       }
30319       __Pyx_XDECREF_SET(__pyx_v_ns, __pyx_t_5);
30320       __pyx_t_5 = 0;
30321       __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
30322       __pyx_t_6 = 0;
30323
30324       /* "src/lxml/objectpath.pxi":146
30325  *         else:
30326  *             ns, name = cetree.getNsTag(item)
30327  *             c_name = _xcstr(name)             # <<<<<<<<<<<<<<
30328  *             index_pos = tree.xmlStrchr(c_name, c'[')
30329  *             if index_pos is NULL:
30330  */
30331       __pyx_v_c_name = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name);
30332
30333       /* "src/lxml/objectpath.pxi":147
30334  *             ns, name = cetree.getNsTag(item)
30335  *             c_name = _xcstr(name)
30336  *             index_pos = tree.xmlStrchr(c_name, c'[')             # <<<<<<<<<<<<<<
30337  *             if index_pos is NULL:
30338  *                 index = 0
30339  */
30340       __pyx_v_index_pos = xmlStrchr(__pyx_v_c_name, '[');
30341
30342       /* "src/lxml/objectpath.pxi":148
30343  *             c_name = _xcstr(name)
30344  *             index_pos = tree.xmlStrchr(c_name, c'[')
30345  *             if index_pos is NULL:             # <<<<<<<<<<<<<<
30346  *                 index = 0
30347  *             else:
30348  */
30349       __pyx_t_7 = ((__pyx_v_index_pos == NULL) != 0);
30350       if (__pyx_t_7) {
30351
30352         /* "src/lxml/objectpath.pxi":149
30353  *             index_pos = tree.xmlStrchr(c_name, c'[')
30354  *             if index_pos is NULL:
30355  *                 index = 0             # <<<<<<<<<<<<<<
30356  *             else:
30357  *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
30358  */
30359         __Pyx_INCREF(__pyx_int_0);
30360         __Pyx_XDECREF_SET(__pyx_v_index, __pyx_int_0);
30361
30362         /* "src/lxml/objectpath.pxi":148
30363  *             c_name = _xcstr(name)
30364  *             index_pos = tree.xmlStrchr(c_name, c'[')
30365  *             if index_pos is NULL:             # <<<<<<<<<<<<<<
30366  *                 index = 0
30367  *             else:
30368  */
30369         goto __pyx_L8;
30370       }
30371
30372       /* "src/lxml/objectpath.pxi":151
30373  *                 index = 0
30374  *             else:
30375  *                 index_end = tree.xmlStrchr(index_pos + 1, c']')             # <<<<<<<<<<<<<<
30376  *                 if index_end is NULL:
30377  *                     raise ValueError, u"index must be enclosed in []"
30378  */
30379       /*else*/ {
30380         __pyx_v_index_end = xmlStrchr((__pyx_v_index_pos + 1), ']');
30381
30382         /* "src/lxml/objectpath.pxi":152
30383  *             else:
30384  *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
30385  *                 if index_end is NULL:             # <<<<<<<<<<<<<<
30386  *                     raise ValueError, u"index must be enclosed in []"
30387  *                 index = int(index_pos[1:index_end - index_pos])
30388  */
30389         __pyx_t_7 = ((__pyx_v_index_end == NULL) != 0);
30390         if (unlikely(__pyx_t_7)) {
30391
30392           /* "src/lxml/objectpath.pxi":153
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  *                 if not new_path and index != 0:
30398  */
30399           __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_index_must_be_enclosed_in, 0, 0);
30400           __PYX_ERR(1, 153, __pyx_L1_error)
30401
30402           /* "src/lxml/objectpath.pxi":152
30403  *             else:
30404  *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
30405  *                 if index_end is NULL:             # <<<<<<<<<<<<<<
30406  *                     raise ValueError, u"index must be enclosed in []"
30407  *                 index = int(index_pos[1:index_end - index_pos])
30408  */
30409         }
30410
30411         /* "src/lxml/objectpath.pxi":154
30412  *                 if index_end is NULL:
30413  *                     raise ValueError, u"index must be enclosed in []"
30414  *                 index = int(index_pos[1:index_end - index_pos])             # <<<<<<<<<<<<<<
30415  *                 if not new_path and index != 0:
30416  *                     raise ValueError, u"index not allowed on root node"
30417  */
30418         __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)
30419         __Pyx_GOTREF(__pyx_t_4);
30420         __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
30421         __Pyx_GOTREF(__pyx_t_6);
30422         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30423         __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_6);
30424         __pyx_t_6 = 0;
30425
30426         /* "src/lxml/objectpath.pxi":155
30427  *                     raise ValueError, u"index must be enclosed in []"
30428  *                 index = int(index_pos[1:index_end - index_pos])
30429  *                 if not new_path and index != 0:             # <<<<<<<<<<<<<<
30430  *                     raise ValueError, u"index not allowed on root node"
30431  *                 name = <bytes>c_name[:index_pos - c_name]
30432  */
30433         __pyx_t_9 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
30434         __pyx_t_8 = ((!__pyx_t_9) != 0);
30435         if (__pyx_t_8) {
30436         } else {
30437           __pyx_t_7 = __pyx_t_8;
30438           goto __pyx_L11_bool_binop_done;
30439         }
30440         __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)
30441         __Pyx_GOTREF(__pyx_t_6);
30442         __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 155, __pyx_L1_error)
30443         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
30444         __pyx_t_7 = __pyx_t_8;
30445         __pyx_L11_bool_binop_done:;
30446         if (unlikely(__pyx_t_7)) {
30447
30448           /* "src/lxml/objectpath.pxi":156
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  *         new_path.append( (ns, name, index) )
30454  */
30455           __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_index_not_allowed_on_root_node, 0, 0);
30456           __PYX_ERR(1, 156, __pyx_L1_error)
30457
30458           /* "src/lxml/objectpath.pxi":155
30459  *                     raise ValueError, u"index must be enclosed in []"
30460  *                 index = int(index_pos[1:index_end - index_pos])
30461  *                 if not new_path and index != 0:             # <<<<<<<<<<<<<<
30462  *                     raise ValueError, u"index not allowed on root node"
30463  *                 name = <bytes>c_name[:index_pos - c_name]
30464  */
30465         }
30466
30467         /* "src/lxml/objectpath.pxi":157
30468  *                 if not new_path and index != 0:
30469  *                     raise ValueError, u"index not allowed on root node"
30470  *                 name = <bytes>c_name[:index_pos - c_name]             # <<<<<<<<<<<<<<
30471  *         new_path.append( (ns, name, index) )
30472  *     if not new_path:
30473  */
30474         __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)
30475         __Pyx_GOTREF(__pyx_t_6);
30476         __pyx_t_4 = __pyx_t_6;
30477         __Pyx_INCREF(__pyx_t_4);
30478         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
30479         __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4);
30480         __pyx_t_4 = 0;
30481       }
30482       __pyx_L8:;
30483     }
30484     __pyx_L5:;
30485
30486     /* "src/lxml/objectpath.pxi":158
30487  *                     raise ValueError, u"index not allowed on root node"
30488  *                 name = <bytes>c_name[:index_pos - c_name]
30489  *         new_path.append( (ns, name, index) )             # <<<<<<<<<<<<<<
30490  *     if not new_path:
30491  *         raise ValueError, u"invalid path"
30492  */
30493     __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 158, __pyx_L1_error)
30494     __Pyx_GOTREF(__pyx_t_4);
30495     __Pyx_INCREF(__pyx_v_ns);
30496     __Pyx_GIVEREF(__pyx_v_ns);
30497     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ns);
30498     __Pyx_INCREF(__pyx_v_name);
30499     __Pyx_GIVEREF(__pyx_v_name);
30500     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_name);
30501     __Pyx_INCREF(__pyx_v_index);
30502     __Pyx_GIVEREF(__pyx_v_index);
30503     PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_index);
30504     __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)
30505     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30506
30507     /* "src/lxml/objectpath.pxi":138
30508  *     """
30509  *     new_path = []
30510  *     for item in path:             # <<<<<<<<<<<<<<
30511  *         item = item.strip()
30512  *         if not new_path and item == u'':
30513  */
30514   }
30515   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30516
30517   /* "src/lxml/objectpath.pxi":159
30518  *                 name = <bytes>c_name[:index_pos - c_name]
30519  *         new_path.append( (ns, name, index) )
30520  *     if not new_path:             # <<<<<<<<<<<<<<
30521  *         raise ValueError, u"invalid path"
30522  *     return new_path
30523  */
30524   __pyx_t_7 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
30525   __pyx_t_8 = ((!__pyx_t_7) != 0);
30526   if (unlikely(__pyx_t_8)) {
30527
30528     /* "src/lxml/objectpath.pxi":160
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     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_invalid_path, 0, 0);
30536     __PYX_ERR(1, 160, __pyx_L1_error)
30537
30538     /* "src/lxml/objectpath.pxi":159
30539  *                 name = <bytes>c_name[:index_pos - c_name]
30540  *         new_path.append( (ns, name, index) )
30541  *     if not new_path:             # <<<<<<<<<<<<<<
30542  *         raise ValueError, u"invalid path"
30543  *     return new_path
30544  */
30545   }
30546
30547   /* "src/lxml/objectpath.pxi":161
30548  *     if not new_path:
30549  *         raise ValueError, u"invalid path"
30550  *     return new_path             # <<<<<<<<<<<<<<
30551  * 
30552  * 
30553  */
30554   __Pyx_XDECREF(__pyx_r);
30555   __Pyx_INCREF(__pyx_v_new_path);
30556   __pyx_r = __pyx_v_new_path;
30557   goto __pyx_L0;
30558
30559   /* "src/lxml/objectpath.pxi":134
30560  * 
30561  * 
30562  * cdef list _parse_object_path_list(path):             # <<<<<<<<<<<<<<
30563  *     u"""Parse object path sequence into a (ns, name, index) list.
30564  *     """
30565  */
30566
30567   /* function exit code */
30568   __pyx_L1_error:;
30569   __Pyx_XDECREF(__pyx_t_1);
30570   __Pyx_XDECREF(__pyx_t_4);
30571   __Pyx_XDECREF(__pyx_t_5);
30572   __Pyx_XDECREF(__pyx_t_6);
30573   __Pyx_AddTraceback("lxml.objectify._parse_object_path_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
30574   __pyx_r = 0;
30575   __pyx_L0:;
30576   __Pyx_XDECREF(__pyx_v_new_path);
30577   __Pyx_XDECREF(__pyx_v_item);
30578   __Pyx_XDECREF(__pyx_v_ns);
30579   __Pyx_XDECREF(__pyx_v_name);
30580   __Pyx_XDECREF(__pyx_v_index);
30581   __Pyx_XGIVEREF(__pyx_r);
30582   __Pyx_RefNannyFinishContext();
30583   return __pyx_r;
30584 }
30585
30586 /* "src/lxml/objectpath.pxi":164
30587  * 
30588  * 
30589  * cdef _ObjectPath* _build_object_path_segments(list path_list) except NULL:             # <<<<<<<<<<<<<<
30590  *     cdef _ObjectPath* c_path
30591  *     cdef _ObjectPath* c_path_segments
30592  */
30593
30594 static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__build_object_path_segments(PyObject *__pyx_v_path_list) {
30595   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path;
30596   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path_segments;
30597   PyObject *__pyx_v_href = NULL;
30598   PyObject *__pyx_v_name = NULL;
30599   PyObject *__pyx_v_index = NULL;
30600   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_r;
30601   __Pyx_RefNannyDeclarations
30602   Py_ssize_t __pyx_t_1;
30603   int __pyx_t_2;
30604   PyObject *__pyx_t_3 = NULL;
30605   PyObject *__pyx_t_4 = NULL;
30606   PyObject *__pyx_t_5 = NULL;
30607   PyObject *__pyx_t_6 = NULL;
30608   PyObject *__pyx_t_7 = NULL;
30609   PyObject *__pyx_t_8 = NULL;
30610   PyObject *(*__pyx_t_9)(PyObject *);
30611   const xmlChar *__pyx_t_10;
30612   Py_ssize_t __pyx_t_11;
30613   int __pyx_lineno = 0;
30614   const char *__pyx_filename = NULL;
30615   int __pyx_clineno = 0;
30616   __Pyx_RefNannySetupContext("_build_object_path_segments", 0);
30617
30618   /* "src/lxml/objectpath.pxi":167
30619  *     cdef _ObjectPath* c_path
30620  *     cdef _ObjectPath* c_path_segments
30621  *     c_path_segments = <_ObjectPath*>python.lxml_malloc(len(path_list), sizeof(_ObjectPath))             # <<<<<<<<<<<<<<
30622  *     if c_path_segments is NULL:
30623  *         raise MemoryError()
30624  */
30625   if (unlikely(__pyx_v_path_list == Py_None)) {
30626     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
30627     __PYX_ERR(1, 167, __pyx_L1_error)
30628   }
30629   __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)
30630   __pyx_v_c_path_segments = ((__pyx_t_4lxml_9objectify__ObjectPath *)lxml_malloc(__pyx_t_1, (sizeof(__pyx_t_4lxml_9objectify__ObjectPath))));
30631
30632   /* "src/lxml/objectpath.pxi":168
30633  *     cdef _ObjectPath* c_path_segments
30634  *     c_path_segments = <_ObjectPath*>python.lxml_malloc(len(path_list), sizeof(_ObjectPath))
30635  *     if c_path_segments is NULL:             # <<<<<<<<<<<<<<
30636  *         raise MemoryError()
30637  *     c_path = c_path_segments
30638  */
30639   __pyx_t_2 = ((__pyx_v_c_path_segments == NULL) != 0);
30640   if (unlikely(__pyx_t_2)) {
30641
30642     /* "src/lxml/objectpath.pxi":169
30643  *     c_path_segments = <_ObjectPath*>python.lxml_malloc(len(path_list), sizeof(_ObjectPath))
30644  *     if c_path_segments is NULL:
30645  *         raise MemoryError()             # <<<<<<<<<<<<<<
30646  *     c_path = c_path_segments
30647  *     for href, name, index in path_list:
30648  */
30649     PyErr_NoMemory(); __PYX_ERR(1, 169, __pyx_L1_error)
30650
30651     /* "src/lxml/objectpath.pxi":168
30652  *     cdef _ObjectPath* c_path_segments
30653  *     c_path_segments = <_ObjectPath*>python.lxml_malloc(len(path_list), sizeof(_ObjectPath))
30654  *     if c_path_segments is NULL:             # <<<<<<<<<<<<<<
30655  *         raise MemoryError()
30656  *     c_path = c_path_segments
30657  */
30658   }
30659
30660   /* "src/lxml/objectpath.pxi":170
30661  *     if c_path_segments is NULL:
30662  *         raise MemoryError()
30663  *     c_path = c_path_segments             # <<<<<<<<<<<<<<
30664  *     for href, name, index in path_list:
30665  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30666  */
30667   __pyx_v_c_path = __pyx_v_c_path_segments;
30668
30669   /* "src/lxml/objectpath.pxi":171
30670  *         raise MemoryError()
30671  *     c_path = c_path_segments
30672  *     for href, name, index in path_list:             # <<<<<<<<<<<<<<
30673  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30674  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30675  */
30676   if (unlikely(__pyx_v_path_list == Py_None)) {
30677     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
30678     __PYX_ERR(1, 171, __pyx_L1_error)
30679   }
30680   __pyx_t_3 = __pyx_v_path_list; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
30681   for (;;) {
30682     if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
30683     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30684     __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)
30685     #else
30686     __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)
30687     __Pyx_GOTREF(__pyx_t_4);
30688     #endif
30689     if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
30690       PyObject* sequence = __pyx_t_4;
30691       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
30692       if (unlikely(size != 3)) {
30693         if (size > 3) __Pyx_RaiseTooManyValuesError(3);
30694         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
30695         __PYX_ERR(1, 171, __pyx_L1_error)
30696       }
30697       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30698       if (likely(PyTuple_CheckExact(sequence))) {
30699         __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
30700         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
30701         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
30702       } else {
30703         __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
30704         __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
30705         __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
30706       }
30707       __Pyx_INCREF(__pyx_t_5);
30708       __Pyx_INCREF(__pyx_t_6);
30709       __Pyx_INCREF(__pyx_t_7);
30710       #else
30711       __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 171, __pyx_L1_error)
30712       __Pyx_GOTREF(__pyx_t_5);
30713       __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 171, __pyx_L1_error)
30714       __Pyx_GOTREF(__pyx_t_6);
30715       __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 171, __pyx_L1_error)
30716       __Pyx_GOTREF(__pyx_t_7);
30717       #endif
30718       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30719     } else {
30720       Py_ssize_t index = -1;
30721       __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 171, __pyx_L1_error)
30722       __Pyx_GOTREF(__pyx_t_8);
30723       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30724       __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
30725       index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
30726       __Pyx_GOTREF(__pyx_t_5);
30727       index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
30728       __Pyx_GOTREF(__pyx_t_6);
30729       index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
30730       __Pyx_GOTREF(__pyx_t_7);
30731       if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(1, 171, __pyx_L1_error)
30732       __pyx_t_9 = NULL;
30733       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
30734       goto __pyx_L7_unpacking_done;
30735       __pyx_L6_unpacking_failed:;
30736       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
30737       __pyx_t_9 = NULL;
30738       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
30739       __PYX_ERR(1, 171, __pyx_L1_error)
30740       __pyx_L7_unpacking_done:;
30741     }
30742     __Pyx_XDECREF_SET(__pyx_v_href, __pyx_t_5);
30743     __pyx_t_5 = 0;
30744     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
30745     __pyx_t_6 = 0;
30746     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_7);
30747     __pyx_t_7 = 0;
30748
30749     /* "src/lxml/objectpath.pxi":172
30750  *     c_path = c_path_segments
30751  *     for href, name, index in path_list:
30752  *         c_path[0].href = _xcstr(href) if href is not None else NULL             # <<<<<<<<<<<<<<
30753  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30754  *         c_path[0].index = index
30755  */
30756     __pyx_t_2 = (__pyx_v_href != Py_None);
30757     if ((__pyx_t_2 != 0)) {
30758       __pyx_t_10 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_href);
30759     } else {
30760       __pyx_t_10 = NULL;
30761     }
30762     (__pyx_v_c_path[0]).href = __pyx_t_10;
30763
30764     /* "src/lxml/objectpath.pxi":173
30765  *     for href, name, index in path_list:
30766  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30767  *         c_path[0].name = _xcstr(name) if name is not None else NULL             # <<<<<<<<<<<<<<
30768  *         c_path[0].index = index
30769  *         c_path += 1
30770  */
30771     __pyx_t_2 = (__pyx_v_name != Py_None);
30772     if ((__pyx_t_2 != 0)) {
30773       __pyx_t_10 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name);
30774     } else {
30775       __pyx_t_10 = NULL;
30776     }
30777     (__pyx_v_c_path[0]).name = __pyx_t_10;
30778
30779     /* "src/lxml/objectpath.pxi":174
30780  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30781  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30782  *         c_path[0].index = index             # <<<<<<<<<<<<<<
30783  *         c_path += 1
30784  *     return c_path_segments
30785  */
30786     __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)
30787     (__pyx_v_c_path[0]).index = __pyx_t_11;
30788
30789     /* "src/lxml/objectpath.pxi":175
30790  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30791  *         c_path[0].index = index
30792  *         c_path += 1             # <<<<<<<<<<<<<<
30793  *     return c_path_segments
30794  * 
30795  */
30796     __pyx_v_c_path = (__pyx_v_c_path + 1);
30797
30798     /* "src/lxml/objectpath.pxi":171
30799  *         raise MemoryError()
30800  *     c_path = c_path_segments
30801  *     for href, name, index in path_list:             # <<<<<<<<<<<<<<
30802  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30803  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30804  */
30805   }
30806   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30807
30808   /* "src/lxml/objectpath.pxi":176
30809  *         c_path[0].index = index
30810  *         c_path += 1
30811  *     return c_path_segments             # <<<<<<<<<<<<<<
30812  * 
30813  * 
30814  */
30815   __pyx_r = __pyx_v_c_path_segments;
30816   goto __pyx_L0;
30817
30818   /* "src/lxml/objectpath.pxi":164
30819  * 
30820  * 
30821  * cdef _ObjectPath* _build_object_path_segments(list path_list) except NULL:             # <<<<<<<<<<<<<<
30822  *     cdef _ObjectPath* c_path
30823  *     cdef _ObjectPath* c_path_segments
30824  */
30825
30826   /* function exit code */
30827   __pyx_L1_error:;
30828   __Pyx_XDECREF(__pyx_t_3);
30829   __Pyx_XDECREF(__pyx_t_4);
30830   __Pyx_XDECREF(__pyx_t_5);
30831   __Pyx_XDECREF(__pyx_t_6);
30832   __Pyx_XDECREF(__pyx_t_7);
30833   __Pyx_XDECREF(__pyx_t_8);
30834   __Pyx_AddTraceback("lxml.objectify._build_object_path_segments", __pyx_clineno, __pyx_lineno, __pyx_filename);
30835   __pyx_r = NULL;
30836   __pyx_L0:;
30837   __Pyx_XDECREF(__pyx_v_href);
30838   __Pyx_XDECREF(__pyx_v_name);
30839   __Pyx_XDECREF(__pyx_v_index);
30840   __Pyx_RefNannyFinishContext();
30841   return __pyx_r;
30842 }
30843
30844 /* "src/lxml/objectpath.pxi":179
30845  * 
30846  * 
30847  * cdef _find_object_path(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len, default_value):             # <<<<<<<<<<<<<<
30848  *     u"""Follow the path to find the target element.
30849  *     """
30850  */
30851
30852 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) {
30853   xmlNode *__pyx_v_c_node;
30854   Py_ssize_t __pyx_v_c_index;
30855   const xmlChar *__pyx_v_c_name;
30856   const xmlChar *__pyx_v_c_href;
30857   PyObject *__pyx_v_tag = NULL;
30858   PyObject *__pyx_r = NULL;
30859   __Pyx_RefNannyDeclarations
30860   xmlNode *__pyx_t_1;
30861   const xmlChar *__pyx_t_2;
30862   int __pyx_t_3;
30863   int __pyx_t_4;
30864   PyObject *__pyx_t_5 = NULL;
30865   Py_ssize_t __pyx_t_6;
30866   Py_UCS4 __pyx_t_7;
30867   PyObject *__pyx_t_8 = NULL;
30868   PyObject *__pyx_t_9 = NULL;
30869   int __pyx_lineno = 0;
30870   const char *__pyx_filename = NULL;
30871   int __pyx_clineno = 0;
30872   __Pyx_RefNannySetupContext("_find_object_path", 0);
30873
30874   /* "src/lxml/objectpath.pxi":184
30875  *     cdef tree.xmlNode* c_node
30876  *     cdef Py_ssize_t c_index
30877  *     c_node = root._c_node             # <<<<<<<<<<<<<<
30878  *     c_name = c_path[0].name
30879  *     c_href = c_path[0].href
30880  */
30881   __pyx_t_1 = __pyx_v_root->_c_node;
30882   __pyx_v_c_node = __pyx_t_1;
30883
30884   /* "src/lxml/objectpath.pxi":185
30885  *     cdef Py_ssize_t c_index
30886  *     c_node = root._c_node
30887  *     c_name = c_path[0].name             # <<<<<<<<<<<<<<
30888  *     c_href = c_path[0].href
30889  *     if c_href is NULL or c_href[0] == c'\0':
30890  */
30891   __pyx_t_2 = (__pyx_v_c_path[0]).name;
30892   __pyx_v_c_name = __pyx_t_2;
30893
30894   /* "src/lxml/objectpath.pxi":186
30895  *     c_node = root._c_node
30896  *     c_name = c_path[0].name
30897  *     c_href = c_path[0].href             # <<<<<<<<<<<<<<
30898  *     if c_href is NULL or c_href[0] == c'\0':
30899  *         c_href = tree._getNs(c_node)
30900  */
30901   __pyx_t_2 = (__pyx_v_c_path[0]).href;
30902   __pyx_v_c_href = __pyx_t_2;
30903
30904   /* "src/lxml/objectpath.pxi":187
30905  *     c_name = c_path[0].name
30906  *     c_href = c_path[0].href
30907  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
30908  *         c_href = tree._getNs(c_node)
30909  *     if not cetree.tagMatches(c_node, c_href, c_name):
30910  */
30911   __pyx_t_4 = ((__pyx_v_c_href == NULL) != 0);
30912   if (!__pyx_t_4) {
30913   } else {
30914     __pyx_t_3 = __pyx_t_4;
30915     goto __pyx_L4_bool_binop_done;
30916   }
30917   __pyx_t_4 = (((__pyx_v_c_href[0]) == '\x00') != 0);
30918   __pyx_t_3 = __pyx_t_4;
30919   __pyx_L4_bool_binop_done:;
30920   if (__pyx_t_3) {
30921
30922     /* "src/lxml/objectpath.pxi":188
30923  *     c_href = c_path[0].href
30924  *     if c_href is NULL or c_href[0] == c'\0':
30925  *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
30926  *     if not cetree.tagMatches(c_node, c_href, c_name):
30927  *         if default_value is not _NO_DEFAULT:
30928  */
30929     __pyx_v_c_href = _getNs(__pyx_v_c_node);
30930
30931     /* "src/lxml/objectpath.pxi":187
30932  *     c_name = c_path[0].name
30933  *     c_href = c_path[0].href
30934  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
30935  *         c_href = tree._getNs(c_node)
30936  *     if not cetree.tagMatches(c_node, c_href, c_name):
30937  */
30938   }
30939
30940   /* "src/lxml/objectpath.pxi":189
30941  *     if c_href is NULL or c_href[0] == c'\0':
30942  *         c_href = tree._getNs(c_node)
30943  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
30944  *         if default_value is not _NO_DEFAULT:
30945  *             return default_value
30946  */
30947   __pyx_t_3 = ((!(tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name) != 0)) != 0);
30948   if (__pyx_t_3) {
30949
30950     /* "src/lxml/objectpath.pxi":190
30951  *         c_href = tree._getNs(c_node)
30952  *     if not cetree.tagMatches(c_node, c_href, c_name):
30953  *         if default_value is not _NO_DEFAULT:             # <<<<<<<<<<<<<<
30954  *             return default_value
30955  *         else:
30956  */
30957     __pyx_t_3 = (__pyx_v_default_value != __pyx_v_4lxml_9objectify__NO_DEFAULT);
30958     __pyx_t_4 = (__pyx_t_3 != 0);
30959     if (likely(__pyx_t_4)) {
30960
30961       /* "src/lxml/objectpath.pxi":191
30962  *     if not cetree.tagMatches(c_node, c_href, c_name):
30963  *         if default_value is not _NO_DEFAULT:
30964  *             return default_value             # <<<<<<<<<<<<<<
30965  *         else:
30966  *             raise ValueError(
30967  */
30968       __Pyx_XDECREF(__pyx_r);
30969       __Pyx_INCREF(__pyx_v_default_value);
30970       __pyx_r = __pyx_v_default_value;
30971       goto __pyx_L0;
30972
30973       /* "src/lxml/objectpath.pxi":190
30974  *         c_href = tree._getNs(c_node)
30975  *     if not cetree.tagMatches(c_node, c_href, c_name):
30976  *         if default_value is not _NO_DEFAULT:             # <<<<<<<<<<<<<<
30977  *             return default_value
30978  *         else:
30979  */
30980     }
30981
30982     /* "src/lxml/objectpath.pxi":193
30983  *             return default_value
30984  *         else:
30985  *             raise ValueError(             # <<<<<<<<<<<<<<
30986  *                 f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
30987  * 
30988  */
30989     /*else*/ {
30990
30991       /* "src/lxml/objectpath.pxi":194
30992  *         else:
30993  *             raise ValueError(
30994  *                 f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")             # <<<<<<<<<<<<<<
30995  * 
30996  *     while c_node is not NULL:
30997  */
30998       __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 194, __pyx_L1_error)
30999       __Pyx_GOTREF(__pyx_t_5);
31000       __pyx_t_6 = 0;
31001       __pyx_t_7 = 127;
31002       __Pyx_INCREF(__pyx_kp_u_root_element_does_not_match_need);
31003       __pyx_t_6 += 34;
31004       __Pyx_GIVEREF(__pyx_kp_u_root_element_does_not_match_need);
31005       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_root_element_does_not_match_need);
31006       __pyx_t_8 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 194, __pyx_L1_error)
31007       __Pyx_GOTREF(__pyx_t_8);
31008       __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 194, __pyx_L1_error)
31009       __Pyx_GOTREF(__pyx_t_9);
31010       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31011       __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;
31012       __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
31013       __Pyx_GIVEREF(__pyx_t_9);
31014       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
31015       __pyx_t_9 = 0;
31016       __Pyx_INCREF(__pyx_kp_u_got);
31017       __pyx_t_6 += 6;
31018       __Pyx_GIVEREF(__pyx_kp_u_got);
31019       PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_got);
31020       __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)
31021       __Pyx_GOTREF(__pyx_t_9);
31022       __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 194, __pyx_L1_error)
31023       __Pyx_GOTREF(__pyx_t_8);
31024       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31025       __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;
31026       __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
31027       __Pyx_GIVEREF(__pyx_t_8);
31028       PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_8);
31029       __pyx_t_8 = 0;
31030       __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)
31031       __Pyx_GOTREF(__pyx_t_8);
31032       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31033
31034       /* "src/lxml/objectpath.pxi":193
31035  *             return default_value
31036  *         else:
31037  *             raise ValueError(             # <<<<<<<<<<<<<<
31038  *                 f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31039  * 
31040  */
31041       __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 193, __pyx_L1_error)
31042       __Pyx_GOTREF(__pyx_t_5);
31043       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31044       __Pyx_Raise(__pyx_t_5, 0, 0, 0);
31045       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31046       __PYX_ERR(1, 193, __pyx_L1_error)
31047     }
31048
31049     /* "src/lxml/objectpath.pxi":189
31050  *     if c_href is NULL or c_href[0] == c'\0':
31051  *         c_href = tree._getNs(c_node)
31052  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
31053  *         if default_value is not _NO_DEFAULT:
31054  *             return default_value
31055  */
31056   }
31057
31058   /* "src/lxml/objectpath.pxi":196
31059  *                 f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31060  * 
31061  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
31062  *         c_path_len -= 1
31063  *         if c_path_len <= 0:
31064  */
31065   while (1) {
31066     __pyx_t_4 = ((__pyx_v_c_node != NULL) != 0);
31067     if (!__pyx_t_4) break;
31068
31069     /* "src/lxml/objectpath.pxi":197
31070  * 
31071  *     while c_node is not NULL:
31072  *         c_path_len -= 1             # <<<<<<<<<<<<<<
31073  *         if c_path_len <= 0:
31074  *             break
31075  */
31076     __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);
31077
31078     /* "src/lxml/objectpath.pxi":198
31079  *     while c_node is not NULL:
31080  *         c_path_len -= 1
31081  *         if c_path_len <= 0:             # <<<<<<<<<<<<<<
31082  *             break
31083  * 
31084  */
31085     __pyx_t_4 = ((__pyx_v_c_path_len <= 0) != 0);
31086     if (__pyx_t_4) {
31087
31088       /* "src/lxml/objectpath.pxi":199
31089  *         c_path_len -= 1
31090  *         if c_path_len <= 0:
31091  *             break             # <<<<<<<<<<<<<<
31092  * 
31093  *         c_path += 1
31094  */
31095       goto __pyx_L9_break;
31096
31097       /* "src/lxml/objectpath.pxi":198
31098  *     while c_node is not NULL:
31099  *         c_path_len -= 1
31100  *         if c_path_len <= 0:             # <<<<<<<<<<<<<<
31101  *             break
31102  * 
31103  */
31104     }
31105
31106     /* "src/lxml/objectpath.pxi":201
31107  *             break
31108  * 
31109  *         c_path += 1             # <<<<<<<<<<<<<<
31110  *         if c_path[0].href is not NULL:
31111  *             c_href = c_path[0].href # otherwise: keep parent namespace
31112  */
31113     __pyx_v_c_path = (__pyx_v_c_path + 1);
31114
31115     /* "src/lxml/objectpath.pxi":202
31116  * 
31117  *         c_path += 1
31118  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
31119  *             c_href = c_path[0].href # otherwise: keep parent namespace
31120  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31121  */
31122     __pyx_t_4 = (((__pyx_v_c_path[0]).href != NULL) != 0);
31123     if (__pyx_t_4) {
31124
31125       /* "src/lxml/objectpath.pxi":203
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  *         if c_name is NULL:
31131  */
31132       __pyx_t_2 = (__pyx_v_c_path[0]).href;
31133       __pyx_v_c_href = __pyx_t_2;
31134
31135       /* "src/lxml/objectpath.pxi":202
31136  * 
31137  *         c_path += 1
31138  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
31139  *             c_href = c_path[0].href # otherwise: keep parent namespace
31140  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31141  */
31142     }
31143
31144     /* "src/lxml/objectpath.pxi":204
31145  *         if c_path[0].href is not NULL:
31146  *             c_href = c_path[0].href # otherwise: keep parent namespace
31147  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)             # <<<<<<<<<<<<<<
31148  *         if c_name is NULL:
31149  *             c_name = c_path[0].name
31150  */
31151     __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);
31152
31153     /* "src/lxml/objectpath.pxi":205
31154  *             c_href = c_path[0].href # otherwise: keep parent namespace
31155  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31156  *         if c_name is NULL:             # <<<<<<<<<<<<<<
31157  *             c_name = c_path[0].name
31158  *             c_node = NULL
31159  */
31160     __pyx_t_4 = ((__pyx_v_c_name == NULL) != 0);
31161     if (__pyx_t_4) {
31162
31163       /* "src/lxml/objectpath.pxi":206
31164  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31165  *         if c_name is NULL:
31166  *             c_name = c_path[0].name             # <<<<<<<<<<<<<<
31167  *             c_node = NULL
31168  *             break
31169  */
31170       __pyx_t_2 = (__pyx_v_c_path[0]).name;
31171       __pyx_v_c_name = __pyx_t_2;
31172
31173       /* "src/lxml/objectpath.pxi":207
31174  *         if c_name is NULL:
31175  *             c_name = c_path[0].name
31176  *             c_node = NULL             # <<<<<<<<<<<<<<
31177  *             break
31178  *         c_index = c_path[0].index
31179  */
31180       __pyx_v_c_node = NULL;
31181
31182       /* "src/lxml/objectpath.pxi":208
31183  *             c_name = c_path[0].name
31184  *             c_node = NULL
31185  *             break             # <<<<<<<<<<<<<<
31186  *         c_index = c_path[0].index
31187  *         c_node = c_node.last if c_index < 0 else c_node.children
31188  */
31189       goto __pyx_L9_break;
31190
31191       /* "src/lxml/objectpath.pxi":205
31192  *             c_href = c_path[0].href # otherwise: keep parent namespace
31193  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31194  *         if c_name is NULL:             # <<<<<<<<<<<<<<
31195  *             c_name = c_path[0].name
31196  *             c_node = NULL
31197  */
31198     }
31199
31200     /* "src/lxml/objectpath.pxi":209
31201  *             c_node = NULL
31202  *             break
31203  *         c_index = c_path[0].index             # <<<<<<<<<<<<<<
31204  *         c_node = c_node.last if c_index < 0 else c_node.children
31205  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
31206  */
31207     __pyx_t_6 = (__pyx_v_c_path[0]).index;
31208     __pyx_v_c_index = __pyx_t_6;
31209
31210     /* "src/lxml/objectpath.pxi":210
31211  *             break
31212  *         c_index = c_path[0].index
31213  *         c_node = c_node.last if c_index < 0 else c_node.children             # <<<<<<<<<<<<<<
31214  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
31215  * 
31216  */
31217     if (((__pyx_v_c_index < 0) != 0)) {
31218       __pyx_t_1 = __pyx_v_c_node->last;
31219     } else {
31220       __pyx_t_1 = __pyx_v_c_node->children;
31221     }
31222     __pyx_v_c_node = __pyx_t_1;
31223
31224     /* "src/lxml/objectpath.pxi":211
31225  *         c_index = c_path[0].index
31226  *         c_node = c_node.last if c_index < 0 else c_node.children
31227  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)             # <<<<<<<<<<<<<<
31228  * 
31229  *     if c_node is not NULL:
31230  */
31231     __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);
31232   }
31233   __pyx_L9_break:;
31234
31235   /* "src/lxml/objectpath.pxi":213
31236  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
31237  * 
31238  *     if c_node is not NULL:             # <<<<<<<<<<<<<<
31239  *         return cetree.elementFactory(root._doc, c_node)
31240  *     elif default_value is not _NO_DEFAULT:
31241  */
31242   __pyx_t_4 = ((__pyx_v_c_node != NULL) != 0);
31243   if (__pyx_t_4) {
31244
31245     /* "src/lxml/objectpath.pxi":214
31246  * 
31247  *     if c_node is not NULL:
31248  *         return cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<<
31249  *     elif default_value is not _NO_DEFAULT:
31250  *         return default_value
31251  */
31252     __Pyx_XDECREF(__pyx_r);
31253     __pyx_t_5 = ((PyObject *)__pyx_v_root->_doc);
31254     __Pyx_INCREF(__pyx_t_5);
31255     __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)
31256     __Pyx_GOTREF(__pyx_t_8);
31257     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31258     __pyx_r = __pyx_t_8;
31259     __pyx_t_8 = 0;
31260     goto __pyx_L0;
31261
31262     /* "src/lxml/objectpath.pxi":213
31263  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
31264  * 
31265  *     if c_node is not NULL:             # <<<<<<<<<<<<<<
31266  *         return cetree.elementFactory(root._doc, c_node)
31267  *     elif default_value is not _NO_DEFAULT:
31268  */
31269   }
31270
31271   /* "src/lxml/objectpath.pxi":215
31272  *     if c_node is not NULL:
31273  *         return cetree.elementFactory(root._doc, c_node)
31274  *     elif default_value is not _NO_DEFAULT:             # <<<<<<<<<<<<<<
31275  *         return default_value
31276  *     else:
31277  */
31278   __pyx_t_4 = (__pyx_v_default_value != __pyx_v_4lxml_9objectify__NO_DEFAULT);
31279   __pyx_t_3 = (__pyx_t_4 != 0);
31280   if (likely(__pyx_t_3)) {
31281
31282     /* "src/lxml/objectpath.pxi":216
31283  *         return cetree.elementFactory(root._doc, c_node)
31284  *     elif default_value is not _NO_DEFAULT:
31285  *         return default_value             # <<<<<<<<<<<<<<
31286  *     else:
31287  *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
31288  */
31289     __Pyx_XDECREF(__pyx_r);
31290     __Pyx_INCREF(__pyx_v_default_value);
31291     __pyx_r = __pyx_v_default_value;
31292     goto __pyx_L0;
31293
31294     /* "src/lxml/objectpath.pxi":215
31295  *     if c_node is not NULL:
31296  *         return cetree.elementFactory(root._doc, c_node)
31297  *     elif default_value is not _NO_DEFAULT:             # <<<<<<<<<<<<<<
31298  *         return default_value
31299  *     else:
31300  */
31301   }
31302
31303   /* "src/lxml/objectpath.pxi":218
31304  *         return default_value
31305  *     else:
31306  *         tag = cetree.namespacedNameFromNsName(c_href, c_name)             # <<<<<<<<<<<<<<
31307  *         raise AttributeError, f"no such child: {tag}"
31308  * 
31309  */
31310   /*else*/ {
31311     __pyx_t_8 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 218, __pyx_L1_error)
31312     __Pyx_GOTREF(__pyx_t_8);
31313     __pyx_v_tag = __pyx_t_8;
31314     __pyx_t_8 = 0;
31315
31316     /* "src/lxml/objectpath.pxi":219
31317  *     else:
31318  *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
31319  *         raise AttributeError, f"no such child: {tag}"             # <<<<<<<<<<<<<<
31320  * 
31321  * 
31322  */
31323     __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_tag, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 219, __pyx_L1_error)
31324     __Pyx_GOTREF(__pyx_t_8);
31325     __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)
31326     __Pyx_GOTREF(__pyx_t_5);
31327     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31328     __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_5, 0, 0);
31329     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31330     __PYX_ERR(1, 219, __pyx_L1_error)
31331   }
31332
31333   /* "src/lxml/objectpath.pxi":179
31334  * 
31335  * 
31336  * cdef _find_object_path(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len, default_value):             # <<<<<<<<<<<<<<
31337  *     u"""Follow the path to find the target element.
31338  *     """
31339  */
31340
31341   /* function exit code */
31342   __pyx_L1_error:;
31343   __Pyx_XDECREF(__pyx_t_5);
31344   __Pyx_XDECREF(__pyx_t_8);
31345   __Pyx_XDECREF(__pyx_t_9);
31346   __Pyx_AddTraceback("lxml.objectify._find_object_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
31347   __pyx_r = 0;
31348   __pyx_L0:;
31349   __Pyx_XDECREF(__pyx_v_tag);
31350   __Pyx_XGIVEREF(__pyx_r);
31351   __Pyx_RefNannyFinishContext();
31352   return __pyx_r;
31353 }
31354
31355 /* "src/lxml/objectpath.pxi":222
31356  * 
31357  * 
31358  * cdef _create_object_path(_Element root, _ObjectPath* c_path,             # <<<<<<<<<<<<<<
31359  *                          Py_ssize_t c_path_len, int replace, value):
31360  *     u"""Follow the path to find the target element, build the missing children
31361  */
31362
31363 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) {
31364   struct LxmlElement *__pyx_v_child = 0;
31365   xmlNode *__pyx_v_c_node;
31366   xmlNode *__pyx_v_c_child;
31367   Py_ssize_t __pyx_v_c_index;
31368   const xmlChar *__pyx_v_c_name;
31369   const xmlChar *__pyx_v_c_href;
31370   struct LxmlElement *__pyx_v_element = NULL;
31371   PyObject *__pyx_r = NULL;
31372   __Pyx_RefNannyDeclarations
31373   int __pyx_t_1;
31374   xmlNode *__pyx_t_2;
31375   const xmlChar *__pyx_t_3;
31376   int __pyx_t_4;
31377   PyObject *__pyx_t_5 = NULL;
31378   Py_ssize_t __pyx_t_6;
31379   Py_UCS4 __pyx_t_7;
31380   PyObject *__pyx_t_8 = NULL;
31381   PyObject *__pyx_t_9 = NULL;
31382   int __pyx_lineno = 0;
31383   const char *__pyx_filename = NULL;
31384   int __pyx_clineno = 0;
31385   __Pyx_RefNannySetupContext("_create_object_path", 0);
31386
31387   /* "src/lxml/objectpath.pxi":232
31388  *     cdef tree.xmlNode* c_child
31389  *     cdef Py_ssize_t c_index
31390  *     if c_path_len == 1:             # <<<<<<<<<<<<<<
31391  *         raise TypeError, u"cannot update root node"
31392  * 
31393  */
31394   __pyx_t_1 = ((__pyx_v_c_path_len == 1) != 0);
31395   if (unlikely(__pyx_t_1)) {
31396
31397     /* "src/lxml/objectpath.pxi":233
31398  *     cdef Py_ssize_t c_index
31399  *     if c_path_len == 1:
31400  *         raise TypeError, u"cannot update root node"             # <<<<<<<<<<<<<<
31401  * 
31402  *     c_node = root._c_node
31403  */
31404     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_cannot_update_root_node, 0, 0);
31405     __PYX_ERR(1, 233, __pyx_L1_error)
31406
31407     /* "src/lxml/objectpath.pxi":232
31408  *     cdef tree.xmlNode* c_child
31409  *     cdef Py_ssize_t c_index
31410  *     if c_path_len == 1:             # <<<<<<<<<<<<<<
31411  *         raise TypeError, u"cannot update root node"
31412  * 
31413  */
31414   }
31415
31416   /* "src/lxml/objectpath.pxi":235
31417  *         raise TypeError, u"cannot update root node"
31418  * 
31419  *     c_node = root._c_node             # <<<<<<<<<<<<<<
31420  *     c_name = c_path[0].name
31421  *     c_href = c_path[0].href
31422  */
31423   __pyx_t_2 = __pyx_v_root->_c_node;
31424   __pyx_v_c_node = __pyx_t_2;
31425
31426   /* "src/lxml/objectpath.pxi":236
31427  * 
31428  *     c_node = root._c_node
31429  *     c_name = c_path[0].name             # <<<<<<<<<<<<<<
31430  *     c_href = c_path[0].href
31431  *     if c_href is NULL or c_href[0] == c'\0':
31432  */
31433   __pyx_t_3 = (__pyx_v_c_path[0]).name;
31434   __pyx_v_c_name = __pyx_t_3;
31435
31436   /* "src/lxml/objectpath.pxi":237
31437  *     c_node = root._c_node
31438  *     c_name = c_path[0].name
31439  *     c_href = c_path[0].href             # <<<<<<<<<<<<<<
31440  *     if c_href is NULL or c_href[0] == c'\0':
31441  *         c_href = tree._getNs(c_node)
31442  */
31443   __pyx_t_3 = (__pyx_v_c_path[0]).href;
31444   __pyx_v_c_href = __pyx_t_3;
31445
31446   /* "src/lxml/objectpath.pxi":238
31447  *     c_name = c_path[0].name
31448  *     c_href = c_path[0].href
31449  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
31450  *         c_href = tree._getNs(c_node)
31451  *     if not cetree.tagMatches(c_node, c_href, c_name):
31452  */
31453   __pyx_t_4 = ((__pyx_v_c_href == NULL) != 0);
31454   if (!__pyx_t_4) {
31455   } else {
31456     __pyx_t_1 = __pyx_t_4;
31457     goto __pyx_L5_bool_binop_done;
31458   }
31459   __pyx_t_4 = (((__pyx_v_c_href[0]) == '\x00') != 0);
31460   __pyx_t_1 = __pyx_t_4;
31461   __pyx_L5_bool_binop_done:;
31462   if (__pyx_t_1) {
31463
31464     /* "src/lxml/objectpath.pxi":239
31465  *     c_href = c_path[0].href
31466  *     if c_href is NULL or c_href[0] == c'\0':
31467  *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
31468  *     if not cetree.tagMatches(c_node, c_href, c_name):
31469  *         raise ValueError(
31470  */
31471     __pyx_v_c_href = _getNs(__pyx_v_c_node);
31472
31473     /* "src/lxml/objectpath.pxi":238
31474  *     c_name = c_path[0].name
31475  *     c_href = c_path[0].href
31476  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
31477  *         c_href = tree._getNs(c_node)
31478  *     if not cetree.tagMatches(c_node, c_href, c_name):
31479  */
31480   }
31481
31482   /* "src/lxml/objectpath.pxi":240
31483  *     if c_href is NULL or c_href[0] == c'\0':
31484  *         c_href = tree._getNs(c_node)
31485  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
31486  *         raise ValueError(
31487  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31488  */
31489   __pyx_t_1 = ((!(tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name) != 0)) != 0);
31490   if (unlikely(__pyx_t_1)) {
31491
31492     /* "src/lxml/objectpath.pxi":242
31493  *     if not cetree.tagMatches(c_node, c_href, c_name):
31494  *         raise ValueError(
31495  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")             # <<<<<<<<<<<<<<
31496  * 
31497  *     while c_path_len > 1:
31498  */
31499     __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 242, __pyx_L1_error)
31500     __Pyx_GOTREF(__pyx_t_5);
31501     __pyx_t_6 = 0;
31502     __pyx_t_7 = 127;
31503     __Pyx_INCREF(__pyx_kp_u_root_element_does_not_match_need);
31504     __pyx_t_6 += 34;
31505     __Pyx_GIVEREF(__pyx_kp_u_root_element_does_not_match_need);
31506     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_root_element_does_not_match_need);
31507     __pyx_t_8 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 242, __pyx_L1_error)
31508     __Pyx_GOTREF(__pyx_t_8);
31509     __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 242, __pyx_L1_error)
31510     __Pyx_GOTREF(__pyx_t_9);
31511     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31512     __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;
31513     __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
31514     __Pyx_GIVEREF(__pyx_t_9);
31515     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
31516     __pyx_t_9 = 0;
31517     __Pyx_INCREF(__pyx_kp_u_got);
31518     __pyx_t_6 += 6;
31519     __Pyx_GIVEREF(__pyx_kp_u_got);
31520     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_got);
31521     __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)
31522     __Pyx_GOTREF(__pyx_t_9);
31523     __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 242, __pyx_L1_error)
31524     __Pyx_GOTREF(__pyx_t_8);
31525     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31526     __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;
31527     __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
31528     __Pyx_GIVEREF(__pyx_t_8);
31529     PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_8);
31530     __pyx_t_8 = 0;
31531     __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)
31532     __Pyx_GOTREF(__pyx_t_8);
31533     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31534
31535     /* "src/lxml/objectpath.pxi":241
31536  *         c_href = tree._getNs(c_node)
31537  *     if not cetree.tagMatches(c_node, c_href, c_name):
31538  *         raise ValueError(             # <<<<<<<<<<<<<<
31539  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31540  * 
31541  */
31542     __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 241, __pyx_L1_error)
31543     __Pyx_GOTREF(__pyx_t_5);
31544     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31545     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
31546     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31547     __PYX_ERR(1, 241, __pyx_L1_error)
31548
31549     /* "src/lxml/objectpath.pxi":240
31550  *     if c_href is NULL or c_href[0] == c'\0':
31551  *         c_href = tree._getNs(c_node)
31552  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
31553  *         raise ValueError(
31554  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31555  */
31556   }
31557
31558   /* "src/lxml/objectpath.pxi":244
31559  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31560  * 
31561  *     while c_path_len > 1:             # <<<<<<<<<<<<<<
31562  *         c_path_len -= 1
31563  *         c_path += 1
31564  */
31565   while (1) {
31566     __pyx_t_1 = ((__pyx_v_c_path_len > 1) != 0);
31567     if (!__pyx_t_1) break;
31568
31569     /* "src/lxml/objectpath.pxi":245
31570  * 
31571  *     while c_path_len > 1:
31572  *         c_path_len -= 1             # <<<<<<<<<<<<<<
31573  *         c_path += 1
31574  *         if c_path[0].href is not NULL:
31575  */
31576     __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);
31577
31578     /* "src/lxml/objectpath.pxi":246
31579  *     while c_path_len > 1:
31580  *         c_path_len -= 1
31581  *         c_path += 1             # <<<<<<<<<<<<<<
31582  *         if c_path[0].href is not NULL:
31583  *             c_href = c_path[0].href # otherwise: keep parent namespace
31584  */
31585     __pyx_v_c_path = (__pyx_v_c_path + 1);
31586
31587     /* "src/lxml/objectpath.pxi":247
31588  *         c_path_len -= 1
31589  *         c_path += 1
31590  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
31591  *             c_href = c_path[0].href # otherwise: keep parent namespace
31592  *         c_index = c_path[0].index
31593  */
31594     __pyx_t_1 = (((__pyx_v_c_path[0]).href != NULL) != 0);
31595     if (__pyx_t_1) {
31596
31597       /* "src/lxml/objectpath.pxi":248
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  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31603  */
31604       __pyx_t_3 = (__pyx_v_c_path[0]).href;
31605       __pyx_v_c_href = __pyx_t_3;
31606
31607       /* "src/lxml/objectpath.pxi":247
31608  *         c_path_len -= 1
31609  *         c_path += 1
31610  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
31611  *             c_href = c_path[0].href # otherwise: keep parent namespace
31612  *         c_index = c_path[0].index
31613  */
31614     }
31615
31616     /* "src/lxml/objectpath.pxi":249
31617  *         if c_path[0].href is not NULL:
31618  *             c_href = c_path[0].href # otherwise: keep parent namespace
31619  *         c_index = c_path[0].index             # <<<<<<<<<<<<<<
31620  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31621  *         if c_name is NULL:
31622  */
31623     __pyx_t_6 = (__pyx_v_c_path[0]).index;
31624     __pyx_v_c_index = __pyx_t_6;
31625
31626     /* "src/lxml/objectpath.pxi":250
31627  *             c_href = c_path[0].href # otherwise: keep parent namespace
31628  *         c_index = c_path[0].index
31629  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)             # <<<<<<<<<<<<<<
31630  *         if c_name is NULL:
31631  *             c_name = c_path[0].name
31632  */
31633     __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);
31634
31635     /* "src/lxml/objectpath.pxi":251
31636  *         c_index = c_path[0].index
31637  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31638  *         if c_name is NULL:             # <<<<<<<<<<<<<<
31639  *             c_name = c_path[0].name
31640  *             c_child = NULL
31641  */
31642     __pyx_t_1 = ((__pyx_v_c_name == NULL) != 0);
31643     if (__pyx_t_1) {
31644
31645       /* "src/lxml/objectpath.pxi":252
31646  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31647  *         if c_name is NULL:
31648  *             c_name = c_path[0].name             # <<<<<<<<<<<<<<
31649  *             c_child = NULL
31650  *         else:
31651  */
31652       __pyx_t_3 = (__pyx_v_c_path[0]).name;
31653       __pyx_v_c_name = __pyx_t_3;
31654
31655       /* "src/lxml/objectpath.pxi":253
31656  *         if c_name is NULL:
31657  *             c_name = c_path[0].name
31658  *             c_child = NULL             # <<<<<<<<<<<<<<
31659  *         else:
31660  *             c_child = c_node.last if c_index < 0 else c_node.children
31661  */
31662       __pyx_v_c_child = NULL;
31663
31664       /* "src/lxml/objectpath.pxi":251
31665  *         c_index = c_path[0].index
31666  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31667  *         if c_name is NULL:             # <<<<<<<<<<<<<<
31668  *             c_name = c_path[0].name
31669  *             c_child = NULL
31670  */
31671       goto __pyx_L11;
31672     }
31673
31674     /* "src/lxml/objectpath.pxi":255
31675  *             c_child = NULL
31676  *         else:
31677  *             c_child = c_node.last if c_index < 0 else c_node.children             # <<<<<<<<<<<<<<
31678  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
31679  * 
31680  */
31681     /*else*/ {
31682       if (((__pyx_v_c_index < 0) != 0)) {
31683         __pyx_t_2 = __pyx_v_c_node->last;
31684       } else {
31685         __pyx_t_2 = __pyx_v_c_node->children;
31686       }
31687       __pyx_v_c_child = __pyx_t_2;
31688
31689       /* "src/lxml/objectpath.pxi":256
31690  *         else:
31691  *             c_child = c_node.last if c_index < 0 else c_node.children
31692  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)             # <<<<<<<<<<<<<<
31693  * 
31694  *         if c_child is not NULL:
31695  */
31696       __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);
31697     }
31698     __pyx_L11:;
31699
31700     /* "src/lxml/objectpath.pxi":258
31701  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
31702  * 
31703  *         if c_child is not NULL:             # <<<<<<<<<<<<<<
31704  *             c_node = c_child
31705  *         elif c_index != 0:
31706  */
31707     __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0);
31708     if (__pyx_t_1) {
31709
31710       /* "src/lxml/objectpath.pxi":259
31711  * 
31712  *         if c_child is not NULL:
31713  *             c_node = c_child             # <<<<<<<<<<<<<<
31714  *         elif c_index != 0:
31715  *             raise TypeError, u"creating indexed path attributes is not supported"
31716  */
31717       __pyx_v_c_node = __pyx_v_c_child;
31718
31719       /* "src/lxml/objectpath.pxi":258
31720  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
31721  * 
31722  *         if c_child is not NULL:             # <<<<<<<<<<<<<<
31723  *             c_node = c_child
31724  *         elif c_index != 0:
31725  */
31726       goto __pyx_L12;
31727     }
31728
31729     /* "src/lxml/objectpath.pxi":260
31730  *         if c_child is not NULL:
31731  *             c_node = c_child
31732  *         elif c_index != 0:             # <<<<<<<<<<<<<<
31733  *             raise TypeError, u"creating indexed path attributes is not supported"
31734  *         elif c_path_len == 1:
31735  */
31736     __pyx_t_1 = ((__pyx_v_c_index != 0) != 0);
31737     if (unlikely(__pyx_t_1)) {
31738
31739       /* "src/lxml/objectpath.pxi":261
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  *             _appendValue(cetree.elementFactory(root._doc, c_node),
31745  */
31746       __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_creating_indexed_path_attributes, 0, 0);
31747       __PYX_ERR(1, 261, __pyx_L1_error)
31748
31749       /* "src/lxml/objectpath.pxi":260
31750  *         if c_child is not NULL:
31751  *             c_node = c_child
31752  *         elif c_index != 0:             # <<<<<<<<<<<<<<
31753  *             raise TypeError, u"creating indexed path attributes is not supported"
31754  *         elif c_path_len == 1:
31755  */
31756     }
31757
31758     /* "src/lxml/objectpath.pxi":262
31759  *         elif c_index != 0:
31760  *             raise TypeError, u"creating indexed path attributes is not supported"
31761  *         elif c_path_len == 1:             # <<<<<<<<<<<<<<
31762  *             _appendValue(cetree.elementFactory(root._doc, c_node),
31763  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31764  */
31765     __pyx_t_1 = ((__pyx_v_c_path_len == 1) != 0);
31766     if (__pyx_t_1) {
31767
31768       /* "src/lxml/objectpath.pxi":263
31769  *             raise TypeError, u"creating indexed path attributes is not supported"
31770  *         elif c_path_len == 1:
31771  *             _appendValue(cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
31772  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31773  *                          value)
31774  */
31775       __pyx_t_5 = ((PyObject *)__pyx_v_root->_doc);
31776       __Pyx_INCREF(__pyx_t_5);
31777       __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)
31778       __Pyx_GOTREF(__pyx_t_8);
31779       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31780
31781       /* "src/lxml/objectpath.pxi":264
31782  *         elif c_path_len == 1:
31783  *             _appendValue(cetree.elementFactory(root._doc, c_node),
31784  *                          cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<<
31785  *                          value)
31786  *             return
31787  */
31788       __pyx_t_5 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 264, __pyx_L1_error)
31789       __Pyx_GOTREF(__pyx_t_5);
31790
31791       /* "src/lxml/objectpath.pxi":263
31792  *             raise TypeError, u"creating indexed path attributes is not supported"
31793  *         elif c_path_len == 1:
31794  *             _appendValue(cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
31795  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31796  *                          value)
31797  */
31798       __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)
31799       __Pyx_GOTREF(__pyx_t_9);
31800       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31801       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31802       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31803
31804       /* "src/lxml/objectpath.pxi":266
31805  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31806  *                          value)
31807  *             return             # <<<<<<<<<<<<<<
31808  *         else:
31809  *             child = cetree.makeSubElement(
31810  */
31811       __Pyx_XDECREF(__pyx_r);
31812       __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31813       goto __pyx_L0;
31814
31815       /* "src/lxml/objectpath.pxi":262
31816  *         elif c_index != 0:
31817  *             raise TypeError, u"creating indexed path attributes is not supported"
31818  *         elif c_path_len == 1:             # <<<<<<<<<<<<<<
31819  *             _appendValue(cetree.elementFactory(root._doc, c_node),
31820  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31821  */
31822     }
31823
31824     /* "src/lxml/objectpath.pxi":268
31825  *             return
31826  *         else:
31827  *             child = cetree.makeSubElement(             # <<<<<<<<<<<<<<
31828  *                 cetree.elementFactory(root._doc, c_node),
31829  *                 cetree.namespacedNameFromNsName(c_href, c_name),
31830  */
31831     /*else*/ {
31832
31833       /* "src/lxml/objectpath.pxi":269
31834  *         else:
31835  *             child = cetree.makeSubElement(
31836  *                 cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
31837  *                 cetree.namespacedNameFromNsName(c_href, c_name),
31838  *                 None, None, None, None)
31839  */
31840       __pyx_t_9 = ((PyObject *)__pyx_v_root->_doc);
31841       __Pyx_INCREF(__pyx_t_9);
31842       __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)
31843       __Pyx_GOTREF(__pyx_t_5);
31844       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31845
31846       /* "src/lxml/objectpath.pxi":270
31847  *             child = cetree.makeSubElement(
31848  *                 cetree.elementFactory(root._doc, c_node),
31849  *                 cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<<
31850  *                 None, None, None, None)
31851  *             c_node = child._c_node
31852  */
31853       __pyx_t_9 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 270, __pyx_L1_error)
31854       __Pyx_GOTREF(__pyx_t_9);
31855
31856       /* "src/lxml/objectpath.pxi":268
31857  *             return
31858  *         else:
31859  *             child = cetree.makeSubElement(             # <<<<<<<<<<<<<<
31860  *                 cetree.elementFactory(root._doc, c_node),
31861  *                 cetree.namespacedNameFromNsName(c_href, c_name),
31862  */
31863       __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)
31864       __Pyx_GOTREF(__pyx_t_8);
31865       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31866       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31867       __Pyx_XDECREF_SET(__pyx_v_child, ((struct LxmlElement *)__pyx_t_8));
31868       __pyx_t_8 = 0;
31869
31870       /* "src/lxml/objectpath.pxi":272
31871  *                 cetree.namespacedNameFromNsName(c_href, c_name),
31872  *                 None, None, None, None)
31873  *             c_node = child._c_node             # <<<<<<<<<<<<<<
31874  * 
31875  *     # if we get here, the entire path was already there
31876  */
31877       __pyx_t_2 = __pyx_v_child->_c_node;
31878       __pyx_v_c_node = __pyx_t_2;
31879     }
31880     __pyx_L12:;
31881   }
31882
31883   /* "src/lxml/objectpath.pxi":275
31884  * 
31885  *     # if we get here, the entire path was already there
31886  *     if replace:             # <<<<<<<<<<<<<<
31887  *         element = cetree.elementFactory(root._doc, c_node)
31888  *         _replaceElement(element, value)
31889  */
31890   __pyx_t_1 = (__pyx_v_replace != 0);
31891   if (__pyx_t_1) {
31892
31893     /* "src/lxml/objectpath.pxi":276
31894  *     # if we get here, the entire path was already there
31895  *     if replace:
31896  *         element = cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<<
31897  *         _replaceElement(element, value)
31898  *     else:
31899  */
31900     __pyx_t_8 = ((PyObject *)__pyx_v_root->_doc);
31901     __Pyx_INCREF(__pyx_t_8);
31902     __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)
31903     __Pyx_GOTREF(__pyx_t_9);
31904     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31905     __pyx_v_element = ((struct LxmlElement *)__pyx_t_9);
31906     __pyx_t_9 = 0;
31907
31908     /* "src/lxml/objectpath.pxi":277
31909  *     if replace:
31910  *         element = cetree.elementFactory(root._doc, c_node)
31911  *         _replaceElement(element, value)             # <<<<<<<<<<<<<<
31912  *     else:
31913  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
31914  */
31915     __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)
31916     __Pyx_GOTREF(__pyx_t_9);
31917     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31918
31919     /* "src/lxml/objectpath.pxi":275
31920  * 
31921  *     # if we get here, the entire path was already there
31922  *     if replace:             # <<<<<<<<<<<<<<
31923  *         element = cetree.elementFactory(root._doc, c_node)
31924  *         _replaceElement(element, value)
31925  */
31926     goto __pyx_L13;
31927   }
31928
31929   /* "src/lxml/objectpath.pxi":279
31930  *         _replaceElement(element, value)
31931  *     else:
31932  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),             # <<<<<<<<<<<<<<
31933  *                      cetree.namespacedName(c_node), value)
31934  * 
31935  */
31936   /*else*/ {
31937     __pyx_t_9 = ((PyObject *)__pyx_v_root->_doc);
31938     __Pyx_INCREF(__pyx_t_9);
31939     __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)
31940     __Pyx_GOTREF(__pyx_t_8);
31941     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31942
31943     /* "src/lxml/objectpath.pxi":280
31944  *     else:
31945  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
31946  *                      cetree.namespacedName(c_node), value)             # <<<<<<<<<<<<<<
31947  * 
31948  * 
31949  */
31950     __pyx_t_9 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 280, __pyx_L1_error)
31951     __Pyx_GOTREF(__pyx_t_9);
31952
31953     /* "src/lxml/objectpath.pxi":279
31954  *         _replaceElement(element, value)
31955  *     else:
31956  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),             # <<<<<<<<<<<<<<
31957  *                      cetree.namespacedName(c_node), value)
31958  * 
31959  */
31960     __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)
31961     __Pyx_GOTREF(__pyx_t_5);
31962     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31963     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31964     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31965   }
31966   __pyx_L13:;
31967
31968   /* "src/lxml/objectpath.pxi":222
31969  * 
31970  * 
31971  * cdef _create_object_path(_Element root, _ObjectPath* c_path,             # <<<<<<<<<<<<<<
31972  *                          Py_ssize_t c_path_len, int replace, value):
31973  *     u"""Follow the path to find the target element, build the missing children
31974  */
31975
31976   /* function exit code */
31977   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31978   goto __pyx_L0;
31979   __pyx_L1_error:;
31980   __Pyx_XDECREF(__pyx_t_5);
31981   __Pyx_XDECREF(__pyx_t_8);
31982   __Pyx_XDECREF(__pyx_t_9);
31983   __Pyx_AddTraceback("lxml.objectify._create_object_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
31984   __pyx_r = 0;
31985   __pyx_L0:;
31986   __Pyx_XDECREF((PyObject *)__pyx_v_child);
31987   __Pyx_XDECREF((PyObject *)__pyx_v_element);
31988   __Pyx_XGIVEREF(__pyx_r);
31989   __Pyx_RefNannyFinishContext();
31990   return __pyx_r;
31991 }
31992
31993 /* "src/lxml/objectpath.pxi":283
31994  * 
31995  * 
31996  * cdef list _build_descendant_paths(tree.xmlNode* c_node, prefix_string):             # <<<<<<<<<<<<<<
31997  *     u"""Returns a list of all descendant paths.
31998  *     """
31999  */
32000
32001 static PyObject *__pyx_f_4lxml_9objectify__build_descendant_paths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_prefix_string) {
32002   PyObject *__pyx_v_path = 0;
32003   PyObject *__pyx_v_path_list = 0;
32004   PyObject *__pyx_v_tag = NULL;
32005   PyObject *__pyx_r = NULL;
32006   __Pyx_RefNannyDeclarations
32007   PyObject *__pyx_t_1 = NULL;
32008   int __pyx_t_2;
32009   int __pyx_t_3;
32010   int __pyx_lineno = 0;
32011   const char *__pyx_filename = NULL;
32012   int __pyx_clineno = 0;
32013   __Pyx_RefNannySetupContext("_build_descendant_paths", 0);
32014   __Pyx_INCREF(__pyx_v_prefix_string);
32015
32016   /* "src/lxml/objectpath.pxi":287
32017  *     """
32018  *     cdef list path, path_list
32019  *     tag = cetree.namespacedName(c_node)             # <<<<<<<<<<<<<<
32020  *     if prefix_string:
32021  *         if prefix_string[-1] != u'.':
32022  */
32023   __pyx_t_1 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)
32024   __Pyx_GOTREF(__pyx_t_1);
32025   __pyx_v_tag = __pyx_t_1;
32026   __pyx_t_1 = 0;
32027
32028   /* "src/lxml/objectpath.pxi":288
32029  *     cdef list path, path_list
32030  *     tag = cetree.namespacedName(c_node)
32031  *     if prefix_string:             # <<<<<<<<<<<<<<
32032  *         if prefix_string[-1] != u'.':
32033  *             prefix_string += u'.'
32034  */
32035   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_prefix_string); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 288, __pyx_L1_error)
32036   if (__pyx_t_2) {
32037
32038     /* "src/lxml/objectpath.pxi":289
32039  *     tag = cetree.namespacedName(c_node)
32040  *     if prefix_string:
32041  *         if prefix_string[-1] != u'.':             # <<<<<<<<<<<<<<
32042  *             prefix_string += u'.'
32043  *         prefix_string = prefix_string + tag
32044  */
32045     __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)
32046     __Pyx_GOTREF(__pyx_t_1);
32047     __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)
32048     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32049     if (__pyx_t_2) {
32050
32051       /* "src/lxml/objectpath.pxi":290
32052  *     if prefix_string:
32053  *         if prefix_string[-1] != u'.':
32054  *             prefix_string += u'.'             # <<<<<<<<<<<<<<
32055  *         prefix_string = prefix_string + tag
32056  *     else:
32057  */
32058       __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)
32059       __Pyx_GOTREF(__pyx_t_1);
32060       __Pyx_DECREF_SET(__pyx_v_prefix_string, __pyx_t_1);
32061       __pyx_t_1 = 0;
32062
32063       /* "src/lxml/objectpath.pxi":289
32064  *     tag = cetree.namespacedName(c_node)
32065  *     if prefix_string:
32066  *         if prefix_string[-1] != u'.':             # <<<<<<<<<<<<<<
32067  *             prefix_string += u'.'
32068  *         prefix_string = prefix_string + tag
32069  */
32070     }
32071
32072     /* "src/lxml/objectpath.pxi":291
32073  *         if prefix_string[-1] != u'.':
32074  *             prefix_string += u'.'
32075  *         prefix_string = prefix_string + tag             # <<<<<<<<<<<<<<
32076  *     else:
32077  *         prefix_string = tag
32078  */
32079     __pyx_t_1 = PyNumber_Add(__pyx_v_prefix_string, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error)
32080     __Pyx_GOTREF(__pyx_t_1);
32081     __Pyx_DECREF_SET(__pyx_v_prefix_string, __pyx_t_1);
32082     __pyx_t_1 = 0;
32083
32084     /* "src/lxml/objectpath.pxi":288
32085  *     cdef list path, path_list
32086  *     tag = cetree.namespacedName(c_node)
32087  *     if prefix_string:             # <<<<<<<<<<<<<<
32088  *         if prefix_string[-1] != u'.':
32089  *             prefix_string += u'.'
32090  */
32091     goto __pyx_L3;
32092   }
32093
32094   /* "src/lxml/objectpath.pxi":293
32095  *         prefix_string = prefix_string + tag
32096  *     else:
32097  *         prefix_string = tag             # <<<<<<<<<<<<<<
32098  *     path = [prefix_string]
32099  *     path_list = []
32100  */
32101   /*else*/ {
32102     __Pyx_INCREF(__pyx_v_tag);
32103     __Pyx_DECREF_SET(__pyx_v_prefix_string, __pyx_v_tag);
32104   }
32105   __pyx_L3:;
32106
32107   /* "src/lxml/objectpath.pxi":294
32108  *     else:
32109  *         prefix_string = tag
32110  *     path = [prefix_string]             # <<<<<<<<<<<<<<
32111  *     path_list = []
32112  *     _recursive_build_descendant_paths(c_node, path, path_list)
32113  */
32114   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 294, __pyx_L1_error)
32115   __Pyx_GOTREF(__pyx_t_1);
32116   __Pyx_INCREF(__pyx_v_prefix_string);
32117   __Pyx_GIVEREF(__pyx_v_prefix_string);
32118   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_prefix_string);
32119   __pyx_v_path = ((PyObject*)__pyx_t_1);
32120   __pyx_t_1 = 0;
32121
32122   /* "src/lxml/objectpath.pxi":295
32123  *         prefix_string = tag
32124  *     path = [prefix_string]
32125  *     path_list = []             # <<<<<<<<<<<<<<
32126  *     _recursive_build_descendant_paths(c_node, path, path_list)
32127  *     return path_list
32128  */
32129   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L1_error)
32130   __Pyx_GOTREF(__pyx_t_1);
32131   __pyx_v_path_list = ((PyObject*)__pyx_t_1);
32132   __pyx_t_1 = 0;
32133
32134   /* "src/lxml/objectpath.pxi":296
32135  *     path = [prefix_string]
32136  *     path_list = []
32137  *     _recursive_build_descendant_paths(c_node, path, path_list)             # <<<<<<<<<<<<<<
32138  *     return path_list
32139  * 
32140  */
32141   __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)
32142
32143   /* "src/lxml/objectpath.pxi":297
32144  *     path_list = []
32145  *     _recursive_build_descendant_paths(c_node, path, path_list)
32146  *     return path_list             # <<<<<<<<<<<<<<
32147  * 
32148  * 
32149  */
32150   __Pyx_XDECREF(__pyx_r);
32151   __Pyx_INCREF(__pyx_v_path_list);
32152   __pyx_r = __pyx_v_path_list;
32153   goto __pyx_L0;
32154
32155   /* "src/lxml/objectpath.pxi":283
32156  * 
32157  * 
32158  * cdef list _build_descendant_paths(tree.xmlNode* c_node, prefix_string):             # <<<<<<<<<<<<<<
32159  *     u"""Returns a list of all descendant paths.
32160  *     """
32161  */
32162
32163   /* function exit code */
32164   __pyx_L1_error:;
32165   __Pyx_XDECREF(__pyx_t_1);
32166   __Pyx_AddTraceback("lxml.objectify._build_descendant_paths", __pyx_clineno, __pyx_lineno, __pyx_filename);
32167   __pyx_r = 0;
32168   __pyx_L0:;
32169   __Pyx_XDECREF(__pyx_v_path);
32170   __Pyx_XDECREF(__pyx_v_path_list);
32171   __Pyx_XDECREF(__pyx_v_tag);
32172   __Pyx_XDECREF(__pyx_v_prefix_string);
32173   __Pyx_XGIVEREF(__pyx_r);
32174   __Pyx_RefNannyFinishContext();
32175   return __pyx_r;
32176 }
32177
32178 /* "src/lxml/objectpath.pxi":300
32179  * 
32180  * 
32181  * cdef int _recursive_build_descendant_paths(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
32182  *                                            list path, list path_list) except -1:
32183  *     u"""Fills the list 'path_list' with all descendant paths, initial prefix
32184  */
32185
32186 static int __pyx_f_4lxml_9objectify__recursive_build_descendant_paths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_path, PyObject *__pyx_v_path_list) {
32187   xmlNode *__pyx_v_c_child;
32188   PyObject *__pyx_v_tags = NULL;
32189   const xmlChar *__pyx_v_c_href;
32190   PyObject *__pyx_v_tag = NULL;
32191   PyObject *__pyx_v_count = NULL;
32192   int __pyx_r;
32193   __Pyx_RefNannyDeclarations
32194   PyObject *__pyx_t_1 = NULL;
32195   int __pyx_t_2;
32196   xmlNode *__pyx_t_3;
32197   int __pyx_t_4;
32198   int __pyx_t_5;
32199   PyObject *__pyx_t_6 = NULL;
32200   Py_ssize_t __pyx_t_7;
32201   Py_UCS4 __pyx_t_8;
32202   int __pyx_t_9;
32203   int __pyx_lineno = 0;
32204   const char *__pyx_filename = NULL;
32205   int __pyx_clineno = 0;
32206   __Pyx_RefNannySetupContext("_recursive_build_descendant_paths", 0);
32207
32208   /* "src/lxml/objectpath.pxi":306
32209  *     """
32210  *     cdef tree.xmlNode* c_child
32211  *     tags = {}             # <<<<<<<<<<<<<<
32212  *     path_list.append(u'.'.join(path))
32213  *     c_href = tree._getNs(c_node)
32214  */
32215   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
32216   __Pyx_GOTREF(__pyx_t_1);
32217   __pyx_v_tags = ((PyObject*)__pyx_t_1);
32218   __pyx_t_1 = 0;
32219
32220   /* "src/lxml/objectpath.pxi":307
32221  *     cdef tree.xmlNode* c_child
32222  *     tags = {}
32223  *     path_list.append(u'.'.join(path))             # <<<<<<<<<<<<<<
32224  *     c_href = tree._getNs(c_node)
32225  *     c_child = c_node.children
32226  */
32227   if (unlikely(__pyx_v_path_list == Py_None)) {
32228     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
32229     __PYX_ERR(1, 307, __pyx_L1_error)
32230   }
32231   __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__2, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 307, __pyx_L1_error)
32232   __Pyx_GOTREF(__pyx_t_1);
32233   __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)
32234   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32235
32236   /* "src/lxml/objectpath.pxi":308
32237  *     tags = {}
32238  *     path_list.append(u'.'.join(path))
32239  *     c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
32240  *     c_child = c_node.children
32241  *     while c_child is not NULL:
32242  */
32243   __pyx_v_c_href = _getNs(__pyx_v_c_node);
32244
32245   /* "src/lxml/objectpath.pxi":309
32246  *     path_list.append(u'.'.join(path))
32247  *     c_href = tree._getNs(c_node)
32248  *     c_child = c_node.children             # <<<<<<<<<<<<<<
32249  *     while c_child is not NULL:
32250  *         while c_child.type != tree.XML_ELEMENT_NODE:
32251  */
32252   __pyx_t_3 = __pyx_v_c_node->children;
32253   __pyx_v_c_child = __pyx_t_3;
32254
32255   /* "src/lxml/objectpath.pxi":310
32256  *     c_href = tree._getNs(c_node)
32257  *     c_child = c_node.children
32258  *     while c_child is not NULL:             # <<<<<<<<<<<<<<
32259  *         while c_child.type != tree.XML_ELEMENT_NODE:
32260  *             c_child = c_child.next
32261  */
32262   while (1) {
32263     __pyx_t_4 = ((__pyx_v_c_child != NULL) != 0);
32264     if (!__pyx_t_4) break;
32265
32266     /* "src/lxml/objectpath.pxi":311
32267  *     c_child = c_node.children
32268  *     while c_child is not NULL:
32269  *         while c_child.type != tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
32270  *             c_child = c_child.next
32271  *             if c_child is NULL:
32272  */
32273     while (1) {
32274       __pyx_t_4 = ((__pyx_v_c_child->type != XML_ELEMENT_NODE) != 0);
32275       if (!__pyx_t_4) break;
32276
32277       /* "src/lxml/objectpath.pxi":312
32278  *     while c_child is not NULL:
32279  *         while c_child.type != tree.XML_ELEMENT_NODE:
32280  *             c_child = c_child.next             # <<<<<<<<<<<<<<
32281  *             if c_child is NULL:
32282  *                 return 0
32283  */
32284       __pyx_t_3 = __pyx_v_c_child->next;
32285       __pyx_v_c_child = __pyx_t_3;
32286
32287       /* "src/lxml/objectpath.pxi":313
32288  *         while c_child.type != tree.XML_ELEMENT_NODE:
32289  *             c_child = c_child.next
32290  *             if c_child is NULL:             # <<<<<<<<<<<<<<
32291  *                 return 0
32292  *         if c_href is tree._getNs(c_child):
32293  */
32294       __pyx_t_4 = ((__pyx_v_c_child == NULL) != 0);
32295       if (__pyx_t_4) {
32296
32297         /* "src/lxml/objectpath.pxi":314
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  *             tag = pyunicode(c_child.name)
32303  */
32304         __pyx_r = 0;
32305         goto __pyx_L0;
32306
32307         /* "src/lxml/objectpath.pxi":313
32308  *         while c_child.type != tree.XML_ELEMENT_NODE:
32309  *             c_child = c_child.next
32310  *             if c_child is NULL:             # <<<<<<<<<<<<<<
32311  *                 return 0
32312  *         if c_href is tree._getNs(c_child):
32313  */
32314       }
32315     }
32316
32317     /* "src/lxml/objectpath.pxi":315
32318  *             if c_child is NULL:
32319  *                 return 0
32320  *         if c_href is tree._getNs(c_child):             # <<<<<<<<<<<<<<
32321  *             tag = pyunicode(c_child.name)
32322  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
32323  */
32324     __pyx_t_4 = ((__pyx_v_c_href == _getNs(__pyx_v_c_child)) != 0);
32325     if (__pyx_t_4) {
32326
32327       /* "src/lxml/objectpath.pxi":316
32328  *                 return 0
32329  *         if c_href is tree._getNs(c_child):
32330  *             tag = pyunicode(c_child.name)             # <<<<<<<<<<<<<<
32331  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
32332  *             # special case: parent has namespace, child does not
32333  */
32334       __pyx_t_1 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 316, __pyx_L1_error)
32335       __Pyx_GOTREF(__pyx_t_1);
32336       __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_1);
32337       __pyx_t_1 = 0;
32338
32339       /* "src/lxml/objectpath.pxi":315
32340  *             if c_child is NULL:
32341  *                 return 0
32342  *         if c_href is tree._getNs(c_child):             # <<<<<<<<<<<<<<
32343  *             tag = pyunicode(c_child.name)
32344  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
32345  */
32346       goto __pyx_L8;
32347     }
32348
32349     /* "src/lxml/objectpath.pxi":317
32350  *         if c_href is tree._getNs(c_child):
32351  *             tag = pyunicode(c_child.name)
32352  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:             # <<<<<<<<<<<<<<
32353  *             # special case: parent has namespace, child does not
32354  *             tag = u'{}' + pyunicode(c_child.name)
32355  */
32356     __pyx_t_5 = ((__pyx_v_c_href != NULL) != 0);
32357     if (__pyx_t_5) {
32358     } else {
32359       __pyx_t_4 = __pyx_t_5;
32360       goto __pyx_L9_bool_binop_done;
32361     }
32362     __pyx_t_5 = ((_getNs(__pyx_v_c_child) == NULL) != 0);
32363     __pyx_t_4 = __pyx_t_5;
32364     __pyx_L9_bool_binop_done:;
32365     if (__pyx_t_4) {
32366
32367       /* "src/lxml/objectpath.pxi":319
32368  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
32369  *             # special case: parent has namespace, child does not
32370  *             tag = u'{}' + pyunicode(c_child.name)             # <<<<<<<<<<<<<<
32371  *         else:
32372  *             tag = cetree.namespacedName(c_child)
32373  */
32374       __pyx_t_1 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 319, __pyx_L1_error)
32375       __Pyx_GOTREF(__pyx_t_1);
32376       __pyx_t_6 = PyNumber_Add(__pyx_kp_u__19, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 319, __pyx_L1_error)
32377       __Pyx_GOTREF(__pyx_t_6);
32378       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32379       __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_6);
32380       __pyx_t_6 = 0;
32381
32382       /* "src/lxml/objectpath.pxi":317
32383  *         if c_href is tree._getNs(c_child):
32384  *             tag = pyunicode(c_child.name)
32385  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:             # <<<<<<<<<<<<<<
32386  *             # special case: parent has namespace, child does not
32387  *             tag = u'{}' + pyunicode(c_child.name)
32388  */
32389       goto __pyx_L8;
32390     }
32391
32392     /* "src/lxml/objectpath.pxi":321
32393  *             tag = u'{}' + pyunicode(c_child.name)
32394  *         else:
32395  *             tag = cetree.namespacedName(c_child)             # <<<<<<<<<<<<<<
32396  *         count = tags.get(tag)
32397  *         if count is None:
32398  */
32399     /*else*/ {
32400       __pyx_t_6 = namespacedName(__pyx_v_c_child); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 321, __pyx_L1_error)
32401       __Pyx_GOTREF(__pyx_t_6);
32402       __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_6);
32403       __pyx_t_6 = 0;
32404     }
32405     __pyx_L8:;
32406
32407     /* "src/lxml/objectpath.pxi":322
32408  *         else:
32409  *             tag = cetree.namespacedName(c_child)
32410  *         count = tags.get(tag)             # <<<<<<<<<<<<<<
32411  *         if count is None:
32412  *             tags[tag] = 1
32413  */
32414     __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)
32415     __Pyx_GOTREF(__pyx_t_6);
32416     __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_6);
32417     __pyx_t_6 = 0;
32418
32419     /* "src/lxml/objectpath.pxi":323
32420  *             tag = cetree.namespacedName(c_child)
32421  *         count = tags.get(tag)
32422  *         if count is None:             # <<<<<<<<<<<<<<
32423  *             tags[tag] = 1
32424  *         else:
32425  */
32426     __pyx_t_4 = (__pyx_v_count == Py_None);
32427     __pyx_t_5 = (__pyx_t_4 != 0);
32428     if (__pyx_t_5) {
32429
32430       /* "src/lxml/objectpath.pxi":324
32431  *         count = tags.get(tag)
32432  *         if count is None:
32433  *             tags[tag] = 1             # <<<<<<<<<<<<<<
32434  *         else:
32435  *             tags[tag] = count + 1
32436  */
32437       if (unlikely(PyDict_SetItem(__pyx_v_tags, __pyx_v_tag, __pyx_int_1) < 0)) __PYX_ERR(1, 324, __pyx_L1_error)
32438
32439       /* "src/lxml/objectpath.pxi":323
32440  *             tag = cetree.namespacedName(c_child)
32441  *         count = tags.get(tag)
32442  *         if count is None:             # <<<<<<<<<<<<<<
32443  *             tags[tag] = 1
32444  *         else:
32445  */
32446       goto __pyx_L11;
32447     }
32448
32449     /* "src/lxml/objectpath.pxi":326
32450  *             tags[tag] = 1
32451  *         else:
32452  *             tags[tag] = count + 1             # <<<<<<<<<<<<<<
32453  *             tag += f'[{count}]'
32454  *         path.append(tag)
32455  */
32456     /*else*/ {
32457       __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)
32458       __Pyx_GOTREF(__pyx_t_6);
32459       if (unlikely(PyDict_SetItem(__pyx_v_tags, __pyx_v_tag, __pyx_t_6) < 0)) __PYX_ERR(1, 326, __pyx_L1_error)
32460       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32461
32462       /* "src/lxml/objectpath.pxi":327
32463  *         else:
32464  *             tags[tag] = count + 1
32465  *             tag += f'[{count}]'             # <<<<<<<<<<<<<<
32466  *         path.append(tag)
32467  *         _recursive_build_descendant_paths(c_child, path, path_list)
32468  */
32469       __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 327, __pyx_L1_error)
32470       __Pyx_GOTREF(__pyx_t_6);
32471       __pyx_t_7 = 0;
32472       __pyx_t_8 = 127;
32473       __Pyx_INCREF(__pyx_kp_u__20);
32474       __pyx_t_7 += 1;
32475       __Pyx_GIVEREF(__pyx_kp_u__20);
32476       PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u__20);
32477       __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_count, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 327, __pyx_L1_error)
32478       __Pyx_GOTREF(__pyx_t_1);
32479       __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;
32480       __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
32481       __Pyx_GIVEREF(__pyx_t_1);
32482       PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
32483       __pyx_t_1 = 0;
32484       __Pyx_INCREF(__pyx_kp_u__21);
32485       __pyx_t_7 += 1;
32486       __Pyx_GIVEREF(__pyx_kp_u__21);
32487       PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__21);
32488       __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)
32489       __Pyx_GOTREF(__pyx_t_1);
32490       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32491       __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_tag, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 327, __pyx_L1_error)
32492       __Pyx_GOTREF(__pyx_t_6);
32493       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32494       __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_6);
32495       __pyx_t_6 = 0;
32496     }
32497     __pyx_L11:;
32498
32499     /* "src/lxml/objectpath.pxi":328
32500  *             tags[tag] = count + 1
32501  *             tag += f'[{count}]'
32502  *         path.append(tag)             # <<<<<<<<<<<<<<
32503  *         _recursive_build_descendant_paths(c_child, path, path_list)
32504  *         del path[-1]
32505  */
32506     if (unlikely(__pyx_v_path == Py_None)) {
32507       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
32508       __PYX_ERR(1, 328, __pyx_L1_error)
32509     }
32510     __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)
32511
32512     /* "src/lxml/objectpath.pxi":329
32513  *             tag += f'[{count}]'
32514  *         path.append(tag)
32515  *         _recursive_build_descendant_paths(c_child, path, path_list)             # <<<<<<<<<<<<<<
32516  *         del path[-1]
32517  *         c_child = c_child.next
32518  */
32519     __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)
32520
32521     /* "src/lxml/objectpath.pxi":330
32522  *         path.append(tag)
32523  *         _recursive_build_descendant_paths(c_child, path, path_list)
32524  *         del path[-1]             # <<<<<<<<<<<<<<
32525  *         c_child = c_child.next
32526  *     return 0
32527  */
32528     if (unlikely(__pyx_v_path == Py_None)) {
32529       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
32530       __PYX_ERR(1, 330, __pyx_L1_error)
32531     }
32532     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)
32533
32534     /* "src/lxml/objectpath.pxi":331
32535  *         _recursive_build_descendant_paths(c_child, path, path_list)
32536  *         del path[-1]
32537  *         c_child = c_child.next             # <<<<<<<<<<<<<<
32538  *     return 0
32539  */
32540     __pyx_t_3 = __pyx_v_c_child->next;
32541     __pyx_v_c_child = __pyx_t_3;
32542   }
32543
32544   /* "src/lxml/objectpath.pxi":332
32545  *         del path[-1]
32546  *         c_child = c_child.next
32547  *     return 0             # <<<<<<<<<<<<<<
32548  */
32549   __pyx_r = 0;
32550   goto __pyx_L0;
32551
32552   /* "src/lxml/objectpath.pxi":300
32553  * 
32554  * 
32555  * cdef int _recursive_build_descendant_paths(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
32556  *                                            list path, list path_list) except -1:
32557  *     u"""Fills the list 'path_list' with all descendant paths, initial prefix
32558  */
32559
32560   /* function exit code */
32561   __pyx_L1_error:;
32562   __Pyx_XDECREF(__pyx_t_1);
32563   __Pyx_XDECREF(__pyx_t_6);
32564   __Pyx_AddTraceback("lxml.objectify._recursive_build_descendant_paths", __pyx_clineno, __pyx_lineno, __pyx_filename);
32565   __pyx_r = -1;
32566   __pyx_L0:;
32567   __Pyx_XDECREF(__pyx_v_tags);
32568   __Pyx_XDECREF(__pyx_v_tag);
32569   __Pyx_XDECREF(__pyx_v_count);
32570   __Pyx_RefNannyFinishContext();
32571   return __pyx_r;
32572 }
32573
32574 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedElement(PyTypeObject *t, PyObject *a, PyObject *k) {
32575   PyObject *o = __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_new(t, a, k);
32576   if (unlikely(!o)) return 0;
32577   return o;
32578 }
32579
32580 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
32581   #if CYTHON_USE_TP_FINALIZE
32582   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
32583     if (PyObject_CallFinalizerFromDealloc(o)) return;
32584   }
32585   #endif
32586   PyObject_GC_UnTrack(o);
32587   PyObject_GC_Track(o);
32588   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);
32589 }
32590
32591 static int __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(PyObject *o, visitproc v, void *a) {
32592   int e;
32593   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;
32594   return 0;
32595 }
32596
32597 static int __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
32598   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);
32599   return 0;
32600 }
32601 static PyObject *__pyx_sq_item_4lxml_9objectify_ObjectifiedElement(PyObject *o, Py_ssize_t i) {
32602   PyObject *r;
32603   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
32604   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
32605   Py_DECREF(x);
32606   return r;
32607 }
32608
32609 static int __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *i, PyObject *v) {
32610   if (v) {
32611     return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_23__setitem__(o, i, v);
32612   }
32613   else {
32614     return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_25__delitem__(o, i);
32615   }
32616 }
32617
32618 static PyObject *__pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n) {
32619   PyObject *v = PyObject_GenericGetAttr(o, n);
32620   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
32621     PyErr_Clear();
32622     v = __pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__(o, n);
32623   }
32624   return v;
32625 }
32626
32627 static int __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n, PyObject *v) {
32628   if (v) {
32629     return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_15__setattr__(o, n, v);
32630   }
32631   else {
32632     return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_17__delattr__(o, n);
32633   }
32634 }
32635
32636 static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text(PyObject *o, CYTHON_UNUSED void *x) {
32637   return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_4text_1__get__(o);
32638 }
32639
32640 static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__(PyObject *o, CYTHON_UNUSED void *x) {
32641   return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_8__dict___1__get__(o);
32642 }
32643
32644 static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedElement[] = {
32645   {"__reduce__", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__, METH_NOARGS, 0},
32646   {"countchildren", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_8countchildren},
32647   {"getchildren", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_10getchildren},
32648   {"__getattr__", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__, METH_O|METH_COEXIST, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_12__getattr__},
32649   {"addattr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_18addattr},
32650   {"descendantpaths", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_26descendantpaths},
32651   {0, 0, 0, 0}
32652 };
32653
32654 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedElement[] = {
32655   {(char *)"text", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text, 0, (char *)0, 0},
32656   {(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},
32657   {0, 0, 0, 0, 0}
32658 };
32659
32660 static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedElement = {
32661   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
32662   0, /*sq_concat*/
32663   0, /*sq_repeat*/
32664   __pyx_sq_item_4lxml_9objectify_ObjectifiedElement, /*sq_item*/
32665   0, /*sq_slice*/
32666   0, /*sq_ass_item*/
32667   0, /*sq_ass_slice*/
32668   0, /*sq_contains*/
32669   0, /*sq_inplace_concat*/
32670   0, /*sq_inplace_repeat*/
32671 };
32672
32673 static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedElement = {
32674   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
32675   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
32676   __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement, /*mp_ass_subscript*/
32677 };
32678
32679 static PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedElement = {
32680   PyVarObject_HEAD_INIT(0, 0)
32681   "lxml.objectify.ObjectifiedElement", /*tp_name*/
32682   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement), /*tp_basicsize*/
32683   0, /*tp_itemsize*/
32684   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
32685   #if PY_VERSION_HEX < 0x030800b4
32686   0, /*tp_print*/
32687   #endif
32688   #if PY_VERSION_HEX >= 0x030800b4
32689   0, /*tp_vectorcall_offset*/
32690   #endif
32691   0, /*tp_getattr*/
32692   0, /*tp_setattr*/
32693   #if PY_MAJOR_VERSION < 3
32694   0, /*tp_compare*/
32695   #endif
32696   #if PY_MAJOR_VERSION >= 3
32697   0, /*tp_as_async*/
32698   #endif
32699   0, /*tp_repr*/
32700   0, /*tp_as_number*/
32701   &__pyx_tp_as_sequence_ObjectifiedElement, /*tp_as_sequence*/
32702   &__pyx_tp_as_mapping_ObjectifiedElement, /*tp_as_mapping*/
32703   0, /*tp_hash*/
32704   0, /*tp_call*/
32705   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_3__str__, /*tp_str*/
32706   __pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement, /*tp_getattro*/
32707   __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement, /*tp_setattro*/
32708   0, /*tp_as_buffer*/
32709   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32710   "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*/
32711   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
32712   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
32713   0, /*tp_richcompare*/
32714   0, /*tp_weaklistoffset*/
32715   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
32716   0, /*tp_iternext*/
32717   __pyx_methods_4lxml_9objectify_ObjectifiedElement, /*tp_methods*/
32718   0, /*tp_members*/
32719   __pyx_getsets_4lxml_9objectify_ObjectifiedElement, /*tp_getset*/
32720   0, /*tp_base*/
32721   0, /*tp_dict*/
32722   0, /*tp_descr_get*/
32723   0, /*tp_descr_set*/
32724   0, /*tp_dictoffset*/
32725   0, /*tp_init*/
32726   0, /*tp_alloc*/
32727   __pyx_tp_new_4lxml_9objectify_ObjectifiedElement, /*tp_new*/
32728   0, /*tp_free*/
32729   0, /*tp_is_gc*/
32730   0, /*tp_bases*/
32731   0, /*tp_mro*/
32732   0, /*tp_cache*/
32733   0, /*tp_subclasses*/
32734   0, /*tp_weaklist*/
32735   0, /*tp_del*/
32736   0, /*tp_version_tag*/
32737   #if PY_VERSION_HEX >= 0x030400a1
32738   0, /*tp_finalize*/
32739   #endif
32740   #if PY_VERSION_HEX >= 0x030800b1
32741   0, /*tp_vectorcall*/
32742   #endif
32743   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
32744   0, /*tp_print*/
32745   #endif
32746 };
32747
32748 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(PyTypeObject *t, PyObject *a, PyObject *k) {
32749   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
32750   if (unlikely(!o)) return 0;
32751   return o;
32752 }
32753
32754 static PyObject *__pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
32755   return __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5pyval_1__get__(o);
32756 }
32757
32758 static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedDataElement[] = {
32759   {"_setText", (PyCFunction)__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText, METH_O, __pyx_doc_4lxml_9objectify_22ObjectifiedDataElement_4_setText},
32760   {0, 0, 0, 0}
32761 };
32762
32763 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement[] = {
32764   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval, 0, (char *)0, 0},
32765   {0, 0, 0, 0, 0}
32766 };
32767
32768 static PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedDataElement = {
32769   PyVarObject_HEAD_INIT(0, 0)
32770   "lxml.objectify.ObjectifiedDataElement", /*tp_name*/
32771   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement), /*tp_basicsize*/
32772   0, /*tp_itemsize*/
32773   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
32774   #if PY_VERSION_HEX < 0x030800b4
32775   0, /*tp_print*/
32776   #endif
32777   #if PY_VERSION_HEX >= 0x030800b4
32778   0, /*tp_vectorcall_offset*/
32779   #endif
32780   0, /*tp_getattr*/
32781   0, /*tp_setattr*/
32782   #if PY_MAJOR_VERSION < 3
32783   0, /*tp_compare*/
32784   #endif
32785   #if PY_MAJOR_VERSION >= 3
32786   0, /*tp_as_async*/
32787   #endif
32788   __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_3__repr__, /*tp_repr*/
32789   0, /*tp_as_number*/
32790   0, /*tp_as_sequence*/
32791   0, /*tp_as_mapping*/
32792   0, /*tp_hash*/
32793   0, /*tp_call*/
32794   __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__, /*tp_str*/
32795   0, /*tp_getattro*/
32796   0, /*tp_setattro*/
32797   0, /*tp_as_buffer*/
32798   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32799   "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*/
32800   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
32801   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
32802   0, /*tp_richcompare*/
32803   0, /*tp_weaklistoffset*/
32804   #if CYTHON_COMPILING_IN_PYPY
32805   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
32806   #else
32807   0, /*tp_iter*/
32808   #endif
32809   0, /*tp_iternext*/
32810   __pyx_methods_4lxml_9objectify_ObjectifiedDataElement, /*tp_methods*/
32811   0, /*tp_members*/
32812   __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement, /*tp_getset*/
32813   0, /*tp_base*/
32814   0, /*tp_dict*/
32815   0, /*tp_descr_get*/
32816   0, /*tp_descr_set*/
32817   0, /*tp_dictoffset*/
32818   0, /*tp_init*/
32819   0, /*tp_alloc*/
32820   __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement, /*tp_new*/
32821   0, /*tp_free*/
32822   0, /*tp_is_gc*/
32823   0, /*tp_bases*/
32824   0, /*tp_mro*/
32825   0, /*tp_cache*/
32826   0, /*tp_subclasses*/
32827   0, /*tp_weaklist*/
32828   0, /*tp_del*/
32829   0, /*tp_version_tag*/
32830   #if PY_VERSION_HEX >= 0x030400a1
32831   0, /*tp_finalize*/
32832   #endif
32833   #if PY_VERSION_HEX >= 0x030800b1
32834   0, /*tp_vectorcall*/
32835   #endif
32836   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
32837   0, /*tp_print*/
32838   #endif
32839 };
32840
32841 static PyObject *__pyx_tp_new_4lxml_9objectify_NumberElement(PyTypeObject *t, PyObject *a, PyObject *k) {
32842   struct __pyx_obj_4lxml_9objectify_NumberElement *p;
32843   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(t, a, k);
32844   if (unlikely(!o)) return 0;
32845   p = ((struct __pyx_obj_4lxml_9objectify_NumberElement *)o);
32846   p->_parse_value = Py_None; Py_INCREF(Py_None);
32847   return o;
32848 }
32849
32850 static void __pyx_tp_dealloc_4lxml_9objectify_NumberElement(PyObject *o) {
32851   struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
32852   #if CYTHON_USE_TP_FINALIZE
32853   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
32854     if (PyObject_CallFinalizerFromDealloc(o)) return;
32855   }
32856   #endif
32857   PyObject_GC_UnTrack(o);
32858   Py_CLEAR(p->_parse_value);
32859   PyObject_GC_Track(o);
32860   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(o);
32861 }
32862
32863 static int __pyx_tp_traverse_4lxml_9objectify_NumberElement(PyObject *o, visitproc v, void *a) {
32864   int e;
32865   struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
32866   e = __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(o, v, a); if (e) return e;
32867   if (p->_parse_value) {
32868     e = (*v)(p->_parse_value, a); if (e) return e;
32869   }
32870   return 0;
32871 }
32872
32873 static int __pyx_tp_clear_4lxml_9objectify_NumberElement(PyObject *o) {
32874   struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
32875   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(o);
32876   Py_CLEAR(p->_parse_value);
32877   return 0;
32878 }
32879
32880 static PyObject *__pyx_getprop_4lxml_9objectify_13NumberElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
32881   return __pyx_pw_4lxml_9objectify_13NumberElement_5pyval_1__get__(o);
32882 }
32883
32884 static PyMethodDef __pyx_methods_4lxml_9objectify_NumberElement[] = {
32885   {"_setValueParser", (PyCFunction)__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser, METH_O, __pyx_doc_4lxml_9objectify_13NumberElement__setValueParser},
32886   {"__complex__", (PyCFunction)__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__, METH_NOARGS, 0},
32887   {0, 0, 0, 0}
32888 };
32889
32890 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NumberElement[] = {
32891   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13NumberElement_pyval, 0, (char *)0, 0},
32892   {0, 0, 0, 0, 0}
32893 };
32894
32895 static PyNumberMethods __pyx_tp_as_number_NumberElement = {
32896   __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
32897   __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
32898   __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
32899   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32900   __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
32901   #endif
32902   __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
32903   0, /*nb_divmod*/
32904   __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
32905   __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
32906   __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
32907   __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
32908   __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
32909   __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
32910   __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
32911   __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
32912   __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
32913   __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
32914   __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
32915   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32916   0, /*nb_coerce*/
32917   #endif
32918   __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
32919   #if PY_MAJOR_VERSION < 3
32920   __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
32921   #else
32922   0, /*reserved*/
32923   #endif
32924   __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
32925   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32926   __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
32927   #endif
32928   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32929   __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
32930   #endif
32931   0, /*nb_inplace_add*/
32932   0, /*nb_inplace_subtract*/
32933   0, /*nb_inplace_multiply*/
32934   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32935   0, /*nb_inplace_divide*/
32936   #endif
32937   0, /*nb_inplace_remainder*/
32938   0, /*nb_inplace_power*/
32939   0, /*nb_inplace_lshift*/
32940   0, /*nb_inplace_rshift*/
32941   0, /*nb_inplace_and*/
32942   0, /*nb_inplace_xor*/
32943   0, /*nb_inplace_or*/
32944   0, /*nb_floor_divide*/
32945   __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
32946   0, /*nb_inplace_floor_divide*/
32947   0, /*nb_inplace_true_divide*/
32948   0, /*nb_index*/
32949   #if PY_VERSION_HEX >= 0x03050000
32950   0, /*nb_matrix_multiply*/
32951   #endif
32952   #if PY_VERSION_HEX >= 0x03050000
32953   0, /*nb_inplace_matrix_multiply*/
32954   #endif
32955 };
32956
32957 static PyTypeObject __pyx_type_4lxml_9objectify_NumberElement = {
32958   PyVarObject_HEAD_INIT(0, 0)
32959   "lxml.objectify.NumberElement", /*tp_name*/
32960   sizeof(struct __pyx_obj_4lxml_9objectify_NumberElement), /*tp_basicsize*/
32961   0, /*tp_itemsize*/
32962   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
32963   #if PY_VERSION_HEX < 0x030800b4
32964   0, /*tp_print*/
32965   #endif
32966   #if PY_VERSION_HEX >= 0x030800b4
32967   0, /*tp_vectorcall_offset*/
32968   #endif
32969   0, /*tp_getattr*/
32970   0, /*tp_setattr*/
32971   #if PY_MAJOR_VERSION < 3
32972   0, /*tp_compare*/
32973   #endif
32974   #if PY_MAJOR_VERSION >= 3
32975   0, /*tp_as_async*/
32976   #endif
32977   __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
32978   &__pyx_tp_as_number_NumberElement, /*tp_as_number*/
32979   0, /*tp_as_sequence*/
32980   0, /*tp_as_mapping*/
32981   __pyx_pw_4lxml_9objectify_13NumberElement_21__hash__, /*tp_hash*/
32982   0, /*tp_call*/
32983   __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
32984   0, /*tp_getattro*/
32985   0, /*tp_setattro*/
32986   0, /*tp_as_buffer*/
32987   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32988   0, /*tp_doc*/
32989   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
32990   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
32991   __pyx_pw_4lxml_9objectify_13NumberElement_19__richcmp__, /*tp_richcompare*/
32992   0, /*tp_weaklistoffset*/
32993   #if CYTHON_COMPILING_IN_PYPY
32994   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
32995   #else
32996   0, /*tp_iter*/
32997   #endif
32998   0, /*tp_iternext*/
32999   __pyx_methods_4lxml_9objectify_NumberElement, /*tp_methods*/
33000   0, /*tp_members*/
33001   __pyx_getsets_4lxml_9objectify_NumberElement, /*tp_getset*/
33002   0, /*tp_base*/
33003   0, /*tp_dict*/
33004   0, /*tp_descr_get*/
33005   0, /*tp_descr_set*/
33006   0, /*tp_dictoffset*/
33007   0, /*tp_init*/
33008   0, /*tp_alloc*/
33009   __pyx_tp_new_4lxml_9objectify_NumberElement, /*tp_new*/
33010   0, /*tp_free*/
33011   0, /*tp_is_gc*/
33012   0, /*tp_bases*/
33013   0, /*tp_mro*/
33014   0, /*tp_cache*/
33015   0, /*tp_subclasses*/
33016   0, /*tp_weaklist*/
33017   0, /*tp_del*/
33018   0, /*tp_version_tag*/
33019   #if PY_VERSION_HEX >= 0x030400a1
33020   0, /*tp_finalize*/
33021   #endif
33022   #if PY_VERSION_HEX >= 0x030800b1
33023   0, /*tp_vectorcall*/
33024   #endif
33025   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33026   0, /*tp_print*/
33027   #endif
33028 };
33029
33030 static PyObject *__pyx_tp_new_4lxml_9objectify_IntElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33031   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
33032   if (unlikely(!o)) return 0;
33033   return o;
33034 }
33035
33036 static PyMethodDef __pyx_methods_4lxml_9objectify_IntElement[] = {
33037   {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_10IntElement_1_init, METH_NOARGS, 0},
33038   {0, 0, 0, 0}
33039 };
33040
33041 static PyNumberMethods __pyx_tp_as_number_IntElement = {
33042   #if CYTHON_COMPILING_IN_PYPY
33043   __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
33044   #else
33045   0, /*nb_add*/
33046   #endif
33047   #if CYTHON_COMPILING_IN_PYPY
33048   __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
33049   #else
33050   0, /*nb_subtract*/
33051   #endif
33052   #if CYTHON_COMPILING_IN_PYPY
33053   __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
33054   #else
33055   0, /*nb_multiply*/
33056   #endif
33057   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33058   #if CYTHON_COMPILING_IN_PYPY
33059   __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
33060   #else
33061   0, /*nb_divide*/
33062   #endif
33063   #endif
33064   #if CYTHON_COMPILING_IN_PYPY
33065   __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
33066   #else
33067   0, /*nb_remainder*/
33068   #endif
33069   0, /*nb_divmod*/
33070   #if CYTHON_COMPILING_IN_PYPY
33071   __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
33072   #else
33073   0, /*nb_power*/
33074   #endif
33075   #if CYTHON_COMPILING_IN_PYPY
33076   __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
33077   #else
33078   0, /*nb_negative*/
33079   #endif
33080   #if CYTHON_COMPILING_IN_PYPY
33081   __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
33082   #else
33083   0, /*nb_positive*/
33084   #endif
33085   #if CYTHON_COMPILING_IN_PYPY
33086   __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
33087   #else
33088   0, /*nb_absolute*/
33089   #endif
33090   #if CYTHON_COMPILING_IN_PYPY
33091   __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
33092   #else
33093   0, /*nb_nonzero*/
33094   #endif
33095   #if CYTHON_COMPILING_IN_PYPY
33096   __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
33097   #else
33098   0, /*nb_invert*/
33099   #endif
33100   #if CYTHON_COMPILING_IN_PYPY
33101   __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
33102   #else
33103   0, /*nb_lshift*/
33104   #endif
33105   #if CYTHON_COMPILING_IN_PYPY
33106   __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
33107   #else
33108   0, /*nb_rshift*/
33109   #endif
33110   #if CYTHON_COMPILING_IN_PYPY
33111   __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
33112   #else
33113   0, /*nb_and*/
33114   #endif
33115   #if CYTHON_COMPILING_IN_PYPY
33116   __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
33117   #else
33118   0, /*nb_xor*/
33119   #endif
33120   #if CYTHON_COMPILING_IN_PYPY
33121   __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
33122   #else
33123   0, /*nb_or*/
33124   #endif
33125   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33126   0, /*nb_coerce*/
33127   #endif
33128   #if CYTHON_COMPILING_IN_PYPY
33129   __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
33130   #else
33131   0, /*nb_int*/
33132   #endif
33133   #if PY_MAJOR_VERSION < 3
33134   #if CYTHON_COMPILING_IN_PYPY
33135   __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
33136   #else
33137   0, /*nb_long*/
33138   #endif
33139   #else
33140   0, /*reserved*/
33141   #endif
33142   #if CYTHON_COMPILING_IN_PYPY
33143   __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
33144   #else
33145   0, /*nb_float*/
33146   #endif
33147   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33148   #if CYTHON_COMPILING_IN_PYPY
33149   __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
33150   #else
33151   0, /*nb_oct*/
33152   #endif
33153   #endif
33154   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33155   #if CYTHON_COMPILING_IN_PYPY
33156   __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
33157   #else
33158   0, /*nb_hex*/
33159   #endif
33160   #endif
33161   0, /*nb_inplace_add*/
33162   0, /*nb_inplace_subtract*/
33163   0, /*nb_inplace_multiply*/
33164   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33165   0, /*nb_inplace_divide*/
33166   #endif
33167   0, /*nb_inplace_remainder*/
33168   0, /*nb_inplace_power*/
33169   0, /*nb_inplace_lshift*/
33170   0, /*nb_inplace_rshift*/
33171   0, /*nb_inplace_and*/
33172   0, /*nb_inplace_xor*/
33173   0, /*nb_inplace_or*/
33174   0, /*nb_floor_divide*/
33175   #if CYTHON_COMPILING_IN_PYPY
33176   __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
33177   #else
33178   0, /*nb_true_divide*/
33179   #endif
33180   0, /*nb_inplace_floor_divide*/
33181   0, /*nb_inplace_true_divide*/
33182   __pyx_pw_4lxml_9objectify_10IntElement_3__index__, /*nb_index*/
33183   #if PY_VERSION_HEX >= 0x03050000
33184   0, /*nb_matrix_multiply*/
33185   #endif
33186   #if PY_VERSION_HEX >= 0x03050000
33187   0, /*nb_inplace_matrix_multiply*/
33188   #endif
33189 };
33190
33191 static PyTypeObject __pyx_type_4lxml_9objectify_IntElement = {
33192   PyVarObject_HEAD_INIT(0, 0)
33193   "lxml.objectify.IntElement", /*tp_name*/
33194   sizeof(struct __pyx_obj_4lxml_9objectify_IntElement), /*tp_basicsize*/
33195   0, /*tp_itemsize*/
33196   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
33197   #if PY_VERSION_HEX < 0x030800b4
33198   0, /*tp_print*/
33199   #endif
33200   #if PY_VERSION_HEX >= 0x030800b4
33201   0, /*tp_vectorcall_offset*/
33202   #endif
33203   0, /*tp_getattr*/
33204   0, /*tp_setattr*/
33205   #if PY_MAJOR_VERSION < 3
33206   0, /*tp_compare*/
33207   #endif
33208   #if PY_MAJOR_VERSION >= 3
33209   0, /*tp_as_async*/
33210   #endif
33211   #if CYTHON_COMPILING_IN_PYPY
33212   __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
33213   #else
33214   0, /*tp_repr*/
33215   #endif
33216   &__pyx_tp_as_number_IntElement, /*tp_as_number*/
33217   0, /*tp_as_sequence*/
33218   0, /*tp_as_mapping*/
33219   0, /*tp_hash*/
33220   0, /*tp_call*/
33221   #if CYTHON_COMPILING_IN_PYPY
33222   __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
33223   #else
33224   0, /*tp_str*/
33225   #endif
33226   0, /*tp_getattro*/
33227   0, /*tp_setattro*/
33228   0, /*tp_as_buffer*/
33229   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33230   0, /*tp_doc*/
33231   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
33232   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
33233   0, /*tp_richcompare*/
33234   0, /*tp_weaklistoffset*/
33235   #if CYTHON_COMPILING_IN_PYPY
33236   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33237   #else
33238   0, /*tp_iter*/
33239   #endif
33240   0, /*tp_iternext*/
33241   __pyx_methods_4lxml_9objectify_IntElement, /*tp_methods*/
33242   0, /*tp_members*/
33243   0, /*tp_getset*/
33244   0, /*tp_base*/
33245   0, /*tp_dict*/
33246   0, /*tp_descr_get*/
33247   0, /*tp_descr_set*/
33248   0, /*tp_dictoffset*/
33249   0, /*tp_init*/
33250   0, /*tp_alloc*/
33251   __pyx_tp_new_4lxml_9objectify_IntElement, /*tp_new*/
33252   0, /*tp_free*/
33253   0, /*tp_is_gc*/
33254   0, /*tp_bases*/
33255   0, /*tp_mro*/
33256   0, /*tp_cache*/
33257   0, /*tp_subclasses*/
33258   0, /*tp_weaklist*/
33259   0, /*tp_del*/
33260   0, /*tp_version_tag*/
33261   #if PY_VERSION_HEX >= 0x030400a1
33262   0, /*tp_finalize*/
33263   #endif
33264   #if PY_VERSION_HEX >= 0x030800b1
33265   0, /*tp_vectorcall*/
33266   #endif
33267   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33268   0, /*tp_print*/
33269   #endif
33270 };
33271
33272 static PyObject *__pyx_tp_new_4lxml_9objectify_LongElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33273   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
33274   if (unlikely(!o)) return 0;
33275   return o;
33276 }
33277
33278 static PyMethodDef __pyx_methods_4lxml_9objectify_LongElement[] = {
33279   {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_11LongElement_1_init, METH_NOARGS, 0},
33280   {0, 0, 0, 0}
33281 };
33282
33283 static PyNumberMethods __pyx_tp_as_number_LongElement = {
33284   #if CYTHON_COMPILING_IN_PYPY
33285   __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
33286   #else
33287   0, /*nb_add*/
33288   #endif
33289   #if CYTHON_COMPILING_IN_PYPY
33290   __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
33291   #else
33292   0, /*nb_subtract*/
33293   #endif
33294   #if CYTHON_COMPILING_IN_PYPY
33295   __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
33296   #else
33297   0, /*nb_multiply*/
33298   #endif
33299   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33300   #if CYTHON_COMPILING_IN_PYPY
33301   __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
33302   #else
33303   0, /*nb_divide*/
33304   #endif
33305   #endif
33306   #if CYTHON_COMPILING_IN_PYPY
33307   __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
33308   #else
33309   0, /*nb_remainder*/
33310   #endif
33311   0, /*nb_divmod*/
33312   #if CYTHON_COMPILING_IN_PYPY
33313   __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
33314   #else
33315   0, /*nb_power*/
33316   #endif
33317   #if CYTHON_COMPILING_IN_PYPY
33318   __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
33319   #else
33320   0, /*nb_negative*/
33321   #endif
33322   #if CYTHON_COMPILING_IN_PYPY
33323   __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
33324   #else
33325   0, /*nb_positive*/
33326   #endif
33327   #if CYTHON_COMPILING_IN_PYPY
33328   __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
33329   #else
33330   0, /*nb_absolute*/
33331   #endif
33332   #if CYTHON_COMPILING_IN_PYPY
33333   __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
33334   #else
33335   0, /*nb_nonzero*/
33336   #endif
33337   #if CYTHON_COMPILING_IN_PYPY
33338   __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
33339   #else
33340   0, /*nb_invert*/
33341   #endif
33342   #if CYTHON_COMPILING_IN_PYPY
33343   __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
33344   #else
33345   0, /*nb_lshift*/
33346   #endif
33347   #if CYTHON_COMPILING_IN_PYPY
33348   __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
33349   #else
33350   0, /*nb_rshift*/
33351   #endif
33352   #if CYTHON_COMPILING_IN_PYPY
33353   __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
33354   #else
33355   0, /*nb_and*/
33356   #endif
33357   #if CYTHON_COMPILING_IN_PYPY
33358   __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
33359   #else
33360   0, /*nb_xor*/
33361   #endif
33362   #if CYTHON_COMPILING_IN_PYPY
33363   __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
33364   #else
33365   0, /*nb_or*/
33366   #endif
33367   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33368   0, /*nb_coerce*/
33369   #endif
33370   #if CYTHON_COMPILING_IN_PYPY
33371   __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
33372   #else
33373   0, /*nb_int*/
33374   #endif
33375   #if PY_MAJOR_VERSION < 3
33376   #if CYTHON_COMPILING_IN_PYPY
33377   __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
33378   #else
33379   0, /*nb_long*/
33380   #endif
33381   #else
33382   0, /*reserved*/
33383   #endif
33384   #if CYTHON_COMPILING_IN_PYPY
33385   __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
33386   #else
33387   0, /*nb_float*/
33388   #endif
33389   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33390   #if CYTHON_COMPILING_IN_PYPY
33391   __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
33392   #else
33393   0, /*nb_oct*/
33394   #endif
33395   #endif
33396   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33397   #if CYTHON_COMPILING_IN_PYPY
33398   __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
33399   #else
33400   0, /*nb_hex*/
33401   #endif
33402   #endif
33403   0, /*nb_inplace_add*/
33404   0, /*nb_inplace_subtract*/
33405   0, /*nb_inplace_multiply*/
33406   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33407   0, /*nb_inplace_divide*/
33408   #endif
33409   0, /*nb_inplace_remainder*/
33410   0, /*nb_inplace_power*/
33411   0, /*nb_inplace_lshift*/
33412   0, /*nb_inplace_rshift*/
33413   0, /*nb_inplace_and*/
33414   0, /*nb_inplace_xor*/
33415   0, /*nb_inplace_or*/
33416   0, /*nb_floor_divide*/
33417   #if CYTHON_COMPILING_IN_PYPY
33418   __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
33419   #else
33420   0, /*nb_true_divide*/
33421   #endif
33422   0, /*nb_inplace_floor_divide*/
33423   0, /*nb_inplace_true_divide*/
33424   __pyx_pw_4lxml_9objectify_11LongElement_3__index__, /*nb_index*/
33425   #if PY_VERSION_HEX >= 0x03050000
33426   0, /*nb_matrix_multiply*/
33427   #endif
33428   #if PY_VERSION_HEX >= 0x03050000
33429   0, /*nb_inplace_matrix_multiply*/
33430   #endif
33431 };
33432
33433 static PyTypeObject __pyx_type_4lxml_9objectify_LongElement = {
33434   PyVarObject_HEAD_INIT(0, 0)
33435   "lxml.objectify.LongElement", /*tp_name*/
33436   sizeof(struct __pyx_obj_4lxml_9objectify_LongElement), /*tp_basicsize*/
33437   0, /*tp_itemsize*/
33438   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
33439   #if PY_VERSION_HEX < 0x030800b4
33440   0, /*tp_print*/
33441   #endif
33442   #if PY_VERSION_HEX >= 0x030800b4
33443   0, /*tp_vectorcall_offset*/
33444   #endif
33445   0, /*tp_getattr*/
33446   0, /*tp_setattr*/
33447   #if PY_MAJOR_VERSION < 3
33448   0, /*tp_compare*/
33449   #endif
33450   #if PY_MAJOR_VERSION >= 3
33451   0, /*tp_as_async*/
33452   #endif
33453   #if CYTHON_COMPILING_IN_PYPY
33454   __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
33455   #else
33456   0, /*tp_repr*/
33457   #endif
33458   &__pyx_tp_as_number_LongElement, /*tp_as_number*/
33459   0, /*tp_as_sequence*/
33460   0, /*tp_as_mapping*/
33461   0, /*tp_hash*/
33462   0, /*tp_call*/
33463   #if CYTHON_COMPILING_IN_PYPY
33464   __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
33465   #else
33466   0, /*tp_str*/
33467   #endif
33468   0, /*tp_getattro*/
33469   0, /*tp_setattro*/
33470   0, /*tp_as_buffer*/
33471   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33472   0, /*tp_doc*/
33473   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
33474   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
33475   0, /*tp_richcompare*/
33476   0, /*tp_weaklistoffset*/
33477   #if CYTHON_COMPILING_IN_PYPY
33478   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33479   #else
33480   0, /*tp_iter*/
33481   #endif
33482   0, /*tp_iternext*/
33483   __pyx_methods_4lxml_9objectify_LongElement, /*tp_methods*/
33484   0, /*tp_members*/
33485   0, /*tp_getset*/
33486   0, /*tp_base*/
33487   0, /*tp_dict*/
33488   0, /*tp_descr_get*/
33489   0, /*tp_descr_set*/
33490   0, /*tp_dictoffset*/
33491   0, /*tp_init*/
33492   0, /*tp_alloc*/
33493   __pyx_tp_new_4lxml_9objectify_LongElement, /*tp_new*/
33494   0, /*tp_free*/
33495   0, /*tp_is_gc*/
33496   0, /*tp_bases*/
33497   0, /*tp_mro*/
33498   0, /*tp_cache*/
33499   0, /*tp_subclasses*/
33500   0, /*tp_weaklist*/
33501   0, /*tp_del*/
33502   0, /*tp_version_tag*/
33503   #if PY_VERSION_HEX >= 0x030400a1
33504   0, /*tp_finalize*/
33505   #endif
33506   #if PY_VERSION_HEX >= 0x030800b1
33507   0, /*tp_vectorcall*/
33508   #endif
33509   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33510   0, /*tp_print*/
33511   #endif
33512 };
33513
33514 static PyObject *__pyx_tp_new_4lxml_9objectify_FloatElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33515   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
33516   if (unlikely(!o)) return 0;
33517   return o;
33518 }
33519
33520 static PyMethodDef __pyx_methods_4lxml_9objectify_FloatElement[] = {
33521   {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_12FloatElement_1_init, METH_NOARGS, 0},
33522   {0, 0, 0, 0}
33523 };
33524
33525 static PyTypeObject __pyx_type_4lxml_9objectify_FloatElement = {
33526   PyVarObject_HEAD_INIT(0, 0)
33527   "lxml.objectify.FloatElement", /*tp_name*/
33528   sizeof(struct __pyx_obj_4lxml_9objectify_FloatElement), /*tp_basicsize*/
33529   0, /*tp_itemsize*/
33530   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
33531   #if PY_VERSION_HEX < 0x030800b4
33532   0, /*tp_print*/
33533   #endif
33534   #if PY_VERSION_HEX >= 0x030800b4
33535   0, /*tp_vectorcall_offset*/
33536   #endif
33537   0, /*tp_getattr*/
33538   0, /*tp_setattr*/
33539   #if PY_MAJOR_VERSION < 3
33540   0, /*tp_compare*/
33541   #endif
33542   #if PY_MAJOR_VERSION >= 3
33543   0, /*tp_as_async*/
33544   #endif
33545   #if CYTHON_COMPILING_IN_PYPY
33546   __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
33547   #else
33548   0, /*tp_repr*/
33549   #endif
33550   0, /*tp_as_number*/
33551   0, /*tp_as_sequence*/
33552   0, /*tp_as_mapping*/
33553   0, /*tp_hash*/
33554   0, /*tp_call*/
33555   #if CYTHON_COMPILING_IN_PYPY
33556   __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
33557   #else
33558   0, /*tp_str*/
33559   #endif
33560   0, /*tp_getattro*/
33561   0, /*tp_setattro*/
33562   0, /*tp_as_buffer*/
33563   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33564   0, /*tp_doc*/
33565   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
33566   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
33567   0, /*tp_richcompare*/
33568   0, /*tp_weaklistoffset*/
33569   #if CYTHON_COMPILING_IN_PYPY
33570   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33571   #else
33572   0, /*tp_iter*/
33573   #endif
33574   0, /*tp_iternext*/
33575   __pyx_methods_4lxml_9objectify_FloatElement, /*tp_methods*/
33576   0, /*tp_members*/
33577   0, /*tp_getset*/
33578   0, /*tp_base*/
33579   0, /*tp_dict*/
33580   0, /*tp_descr_get*/
33581   0, /*tp_descr_set*/
33582   0, /*tp_dictoffset*/
33583   0, /*tp_init*/
33584   0, /*tp_alloc*/
33585   __pyx_tp_new_4lxml_9objectify_FloatElement, /*tp_new*/
33586   0, /*tp_free*/
33587   0, /*tp_is_gc*/
33588   0, /*tp_bases*/
33589   0, /*tp_mro*/
33590   0, /*tp_cache*/
33591   0, /*tp_subclasses*/
33592   0, /*tp_weaklist*/
33593   0, /*tp_del*/
33594   0, /*tp_version_tag*/
33595   #if PY_VERSION_HEX >= 0x030400a1
33596   0, /*tp_finalize*/
33597   #endif
33598   #if PY_VERSION_HEX >= 0x030800b1
33599   0, /*tp_vectorcall*/
33600   #endif
33601   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33602   0, /*tp_print*/
33603   #endif
33604 };
33605
33606 static PyObject *__pyx_tp_new_4lxml_9objectify_StringElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33607   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(t, a, k);
33608   if (unlikely(!o)) return 0;
33609   return o;
33610 }
33611
33612 static PyObject *__pyx_getprop_4lxml_9objectify_13StringElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
33613   return __pyx_pw_4lxml_9objectify_13StringElement_5pyval_1__get__(o);
33614 }
33615
33616 static PyMethodDef __pyx_methods_4lxml_9objectify_StringElement[] = {
33617   {"strlen", (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_3strlen, METH_NOARGS, 0},
33618   {"__complex__", (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_23__complex__, METH_NOARGS, 0},
33619   {0, 0, 0, 0}
33620 };
33621
33622 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_StringElement[] = {
33623   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13StringElement_pyval, 0, (char *)0, 0},
33624   {0, 0, 0, 0, 0}
33625 };
33626
33627 static PyNumberMethods __pyx_tp_as_number_StringElement = {
33628   __pyx_pw_4lxml_9objectify_13StringElement_11__add__, /*nb_add*/
33629   0, /*nb_subtract*/
33630   __pyx_pw_4lxml_9objectify_13StringElement_13__mul__, /*nb_multiply*/
33631   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33632   0, /*nb_divide*/
33633   #endif
33634   __pyx_pw_4lxml_9objectify_13StringElement_15__mod__, /*nb_remainder*/
33635   0, /*nb_divmod*/
33636   0, /*nb_power*/
33637   0, /*nb_negative*/
33638   0, /*nb_positive*/
33639   0, /*nb_absolute*/
33640   __pyx_pw_4lxml_9objectify_13StringElement_5__nonzero__, /*nb_nonzero*/
33641   0, /*nb_invert*/
33642   0, /*nb_lshift*/
33643   0, /*nb_rshift*/
33644   0, /*nb_and*/
33645   0, /*nb_xor*/
33646   0, /*nb_or*/
33647   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33648   0, /*nb_coerce*/
33649   #endif
33650   __pyx_pw_4lxml_9objectify_13StringElement_17__int__, /*nb_int*/
33651   #if PY_MAJOR_VERSION < 3
33652   __pyx_pw_4lxml_9objectify_13StringElement_19__long__, /*nb_long*/
33653   #else
33654   0, /*reserved*/
33655   #endif
33656   __pyx_pw_4lxml_9objectify_13StringElement_21__float__, /*nb_float*/
33657   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33658   0, /*nb_oct*/
33659   #endif
33660   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33661   0, /*nb_hex*/
33662   #endif
33663   0, /*nb_inplace_add*/
33664   0, /*nb_inplace_subtract*/
33665   0, /*nb_inplace_multiply*/
33666   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33667   0, /*nb_inplace_divide*/
33668   #endif
33669   0, /*nb_inplace_remainder*/
33670   0, /*nb_inplace_power*/
33671   0, /*nb_inplace_lshift*/
33672   0, /*nb_inplace_rshift*/
33673   0, /*nb_inplace_and*/
33674   0, /*nb_inplace_xor*/
33675   0, /*nb_inplace_or*/
33676   0, /*nb_floor_divide*/
33677   0, /*nb_true_divide*/
33678   0, /*nb_inplace_floor_divide*/
33679   0, /*nb_inplace_true_divide*/
33680   0, /*nb_index*/
33681   #if PY_VERSION_HEX >= 0x03050000
33682   0, /*nb_matrix_multiply*/
33683   #endif
33684   #if PY_VERSION_HEX >= 0x03050000
33685   0, /*nb_inplace_matrix_multiply*/
33686   #endif
33687 };
33688
33689 static PyTypeObject __pyx_type_4lxml_9objectify_StringElement = {
33690   PyVarObject_HEAD_INIT(0, 0)
33691   "lxml.objectify.StringElement", /*tp_name*/
33692   sizeof(struct __pyx_obj_4lxml_9objectify_StringElement), /*tp_basicsize*/
33693   0, /*tp_itemsize*/
33694   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
33695   #if PY_VERSION_HEX < 0x030800b4
33696   0, /*tp_print*/
33697   #endif
33698   #if PY_VERSION_HEX >= 0x030800b4
33699   0, /*tp_vectorcall_offset*/
33700   #endif
33701   0, /*tp_getattr*/
33702   0, /*tp_setattr*/
33703   #if PY_MAJOR_VERSION < 3
33704   0, /*tp_compare*/
33705   #endif
33706   #if PY_MAJOR_VERSION >= 3
33707   0, /*tp_as_async*/
33708   #endif
33709   __pyx_pw_4lxml_9objectify_13StringElement_1__repr__, /*tp_repr*/
33710   &__pyx_tp_as_number_StringElement, /*tp_as_number*/
33711   0, /*tp_as_sequence*/
33712   0, /*tp_as_mapping*/
33713   __pyx_pw_4lxml_9objectify_13StringElement_9__hash__, /*tp_hash*/
33714   0, /*tp_call*/
33715   #if CYTHON_COMPILING_IN_PYPY
33716   __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__, /*tp_str*/
33717   #else
33718   0, /*tp_str*/
33719   #endif
33720   0, /*tp_getattro*/
33721   0, /*tp_setattro*/
33722   0, /*tp_as_buffer*/
33723   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33724   "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*/
33725   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
33726   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
33727   __pyx_pw_4lxml_9objectify_13StringElement_7__richcmp__, /*tp_richcompare*/
33728   0, /*tp_weaklistoffset*/
33729   #if CYTHON_COMPILING_IN_PYPY
33730   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33731   #else
33732   0, /*tp_iter*/
33733   #endif
33734   0, /*tp_iternext*/
33735   __pyx_methods_4lxml_9objectify_StringElement, /*tp_methods*/
33736   0, /*tp_members*/
33737   __pyx_getsets_4lxml_9objectify_StringElement, /*tp_getset*/
33738   0, /*tp_base*/
33739   0, /*tp_dict*/
33740   0, /*tp_descr_get*/
33741   0, /*tp_descr_set*/
33742   0, /*tp_dictoffset*/
33743   0, /*tp_init*/
33744   0, /*tp_alloc*/
33745   __pyx_tp_new_4lxml_9objectify_StringElement, /*tp_new*/
33746   0, /*tp_free*/
33747   0, /*tp_is_gc*/
33748   0, /*tp_bases*/
33749   0, /*tp_mro*/
33750   0, /*tp_cache*/
33751   0, /*tp_subclasses*/
33752   0, /*tp_weaklist*/
33753   0, /*tp_del*/
33754   0, /*tp_version_tag*/
33755   #if PY_VERSION_HEX >= 0x030400a1
33756   0, /*tp_finalize*/
33757   #endif
33758   #if PY_VERSION_HEX >= 0x030800b1
33759   0, /*tp_vectorcall*/
33760   #endif
33761   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33762   0, /*tp_print*/
33763   #endif
33764 };
33765
33766 static PyObject *__pyx_tp_new_4lxml_9objectify_NoneElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33767   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(t, a, k);
33768   if (unlikely(!o)) return 0;
33769   return o;
33770 }
33771
33772 static PyObject *__pyx_getprop_4lxml_9objectify_11NoneElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
33773   return __pyx_pw_4lxml_9objectify_11NoneElement_5pyval_1__get__(o);
33774 }
33775
33776 static PyMethodDef __pyx_methods_4lxml_9objectify_NoneElement[] = {
33777   {0, 0, 0, 0}
33778 };
33779
33780 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NoneElement[] = {
33781   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11NoneElement_pyval, 0, (char *)0, 0},
33782   {0, 0, 0, 0, 0}
33783 };
33784
33785 static PyNumberMethods __pyx_tp_as_number_NoneElement = {
33786   0, /*nb_add*/
33787   0, /*nb_subtract*/
33788   0, /*nb_multiply*/
33789   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33790   0, /*nb_divide*/
33791   #endif
33792   0, /*nb_remainder*/
33793   0, /*nb_divmod*/
33794   0, /*nb_power*/
33795   0, /*nb_negative*/
33796   0, /*nb_positive*/
33797   0, /*nb_absolute*/
33798   __pyx_pw_4lxml_9objectify_11NoneElement_5__nonzero__, /*nb_nonzero*/
33799   0, /*nb_invert*/
33800   0, /*nb_lshift*/
33801   0, /*nb_rshift*/
33802   0, /*nb_and*/
33803   0, /*nb_xor*/
33804   0, /*nb_or*/
33805   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33806   0, /*nb_coerce*/
33807   #endif
33808   0, /*nb_int*/
33809   #if PY_MAJOR_VERSION < 3
33810   0, /*nb_long*/
33811   #else
33812   0, /*reserved*/
33813   #endif
33814   0, /*nb_float*/
33815   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33816   0, /*nb_oct*/
33817   #endif
33818   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33819   0, /*nb_hex*/
33820   #endif
33821   0, /*nb_inplace_add*/
33822   0, /*nb_inplace_subtract*/
33823   0, /*nb_inplace_multiply*/
33824   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33825   0, /*nb_inplace_divide*/
33826   #endif
33827   0, /*nb_inplace_remainder*/
33828   0, /*nb_inplace_power*/
33829   0, /*nb_inplace_lshift*/
33830   0, /*nb_inplace_rshift*/
33831   0, /*nb_inplace_and*/
33832   0, /*nb_inplace_xor*/
33833   0, /*nb_inplace_or*/
33834   0, /*nb_floor_divide*/
33835   0, /*nb_true_divide*/
33836   0, /*nb_inplace_floor_divide*/
33837   0, /*nb_inplace_true_divide*/
33838   0, /*nb_index*/
33839   #if PY_VERSION_HEX >= 0x03050000
33840   0, /*nb_matrix_multiply*/
33841   #endif
33842   #if PY_VERSION_HEX >= 0x03050000
33843   0, /*nb_inplace_matrix_multiply*/
33844   #endif
33845 };
33846
33847 static PyTypeObject __pyx_type_4lxml_9objectify_NoneElement = {
33848   PyVarObject_HEAD_INIT(0, 0)
33849   "lxml.objectify.NoneElement", /*tp_name*/
33850   sizeof(struct __pyx_obj_4lxml_9objectify_NoneElement), /*tp_basicsize*/
33851   0, /*tp_itemsize*/
33852   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
33853   #if PY_VERSION_HEX < 0x030800b4
33854   0, /*tp_print*/
33855   #endif
33856   #if PY_VERSION_HEX >= 0x030800b4
33857   0, /*tp_vectorcall_offset*/
33858   #endif
33859   0, /*tp_getattr*/
33860   0, /*tp_setattr*/
33861   #if PY_MAJOR_VERSION < 3
33862   0, /*tp_compare*/
33863   #endif
33864   #if PY_MAJOR_VERSION >= 3
33865   0, /*tp_as_async*/
33866   #endif
33867   __pyx_pw_4lxml_9objectify_11NoneElement_3__repr__, /*tp_repr*/
33868   &__pyx_tp_as_number_NoneElement, /*tp_as_number*/
33869   0, /*tp_as_sequence*/
33870   0, /*tp_as_mapping*/
33871   __pyx_pw_4lxml_9objectify_11NoneElement_9__hash__, /*tp_hash*/
33872   0, /*tp_call*/
33873   __pyx_pw_4lxml_9objectify_11NoneElement_1__str__, /*tp_str*/
33874   0, /*tp_getattro*/
33875   0, /*tp_setattro*/
33876   0, /*tp_as_buffer*/
33877   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33878   0, /*tp_doc*/
33879   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
33880   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
33881   __pyx_pw_4lxml_9objectify_11NoneElement_7__richcmp__, /*tp_richcompare*/
33882   0, /*tp_weaklistoffset*/
33883   #if CYTHON_COMPILING_IN_PYPY
33884   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33885   #else
33886   0, /*tp_iter*/
33887   #endif
33888   0, /*tp_iternext*/
33889   __pyx_methods_4lxml_9objectify_NoneElement, /*tp_methods*/
33890   0, /*tp_members*/
33891   __pyx_getsets_4lxml_9objectify_NoneElement, /*tp_getset*/
33892   0, /*tp_base*/
33893   0, /*tp_dict*/
33894   0, /*tp_descr_get*/
33895   0, /*tp_descr_set*/
33896   0, /*tp_dictoffset*/
33897   0, /*tp_init*/
33898   0, /*tp_alloc*/
33899   __pyx_tp_new_4lxml_9objectify_NoneElement, /*tp_new*/
33900   0, /*tp_free*/
33901   0, /*tp_is_gc*/
33902   0, /*tp_bases*/
33903   0, /*tp_mro*/
33904   0, /*tp_cache*/
33905   0, /*tp_subclasses*/
33906   0, /*tp_weaklist*/
33907   0, /*tp_del*/
33908   0, /*tp_version_tag*/
33909   #if PY_VERSION_HEX >= 0x030400a1
33910   0, /*tp_finalize*/
33911   #endif
33912   #if PY_VERSION_HEX >= 0x030800b1
33913   0, /*tp_vectorcall*/
33914   #endif
33915   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33916   0, /*tp_print*/
33917   #endif
33918 };
33919
33920 static PyObject *__pyx_tp_new_4lxml_9objectify_BoolElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33921   PyObject *o = __pyx_tp_new_4lxml_9objectify_IntElement(t, a, k);
33922   if (unlikely(!o)) return 0;
33923   return o;
33924 }
33925
33926 static PyObject *__pyx_getprop_4lxml_9objectify_11BoolElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
33927   return __pyx_pw_4lxml_9objectify_11BoolElement_5pyval_1__get__(o);
33928 }
33929
33930 static PyMethodDef __pyx_methods_4lxml_9objectify_BoolElement[] = {
33931   {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_11BoolElement_1_init, METH_NOARGS, 0},
33932   {0, 0, 0, 0}
33933 };
33934
33935 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_BoolElement[] = {
33936   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11BoolElement_pyval, 0, (char *)0, 0},
33937   {0, 0, 0, 0, 0}
33938 };
33939
33940 static PyNumberMethods __pyx_tp_as_number_BoolElement = {
33941   #if CYTHON_COMPILING_IN_PYPY
33942   __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
33943   #else
33944   0, /*nb_add*/
33945   #endif
33946   #if CYTHON_COMPILING_IN_PYPY
33947   __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
33948   #else
33949   0, /*nb_subtract*/
33950   #endif
33951   #if CYTHON_COMPILING_IN_PYPY
33952   __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
33953   #else
33954   0, /*nb_multiply*/
33955   #endif
33956   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33957   #if CYTHON_COMPILING_IN_PYPY
33958   __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
33959   #else
33960   0, /*nb_divide*/
33961   #endif
33962   #endif
33963   #if CYTHON_COMPILING_IN_PYPY
33964   __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
33965   #else
33966   0, /*nb_remainder*/
33967   #endif
33968   0, /*nb_divmod*/
33969   #if CYTHON_COMPILING_IN_PYPY
33970   __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
33971   #else
33972   0, /*nb_power*/
33973   #endif
33974   #if CYTHON_COMPILING_IN_PYPY
33975   __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
33976   #else
33977   0, /*nb_negative*/
33978   #endif
33979   #if CYTHON_COMPILING_IN_PYPY
33980   __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
33981   #else
33982   0, /*nb_positive*/
33983   #endif
33984   #if CYTHON_COMPILING_IN_PYPY
33985   __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
33986   #else
33987   0, /*nb_absolute*/
33988   #endif
33989   __pyx_pw_4lxml_9objectify_11BoolElement_3__nonzero__, /*nb_nonzero*/
33990   #if CYTHON_COMPILING_IN_PYPY
33991   __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
33992   #else
33993   0, /*nb_invert*/
33994   #endif
33995   #if CYTHON_COMPILING_IN_PYPY
33996   __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
33997   #else
33998   0, /*nb_lshift*/
33999   #endif
34000   #if CYTHON_COMPILING_IN_PYPY
34001   __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
34002   #else
34003   0, /*nb_rshift*/
34004   #endif
34005   #if CYTHON_COMPILING_IN_PYPY
34006   __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
34007   #else
34008   0, /*nb_and*/
34009   #endif
34010   #if CYTHON_COMPILING_IN_PYPY
34011   __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
34012   #else
34013   0, /*nb_xor*/
34014   #endif
34015   #if CYTHON_COMPILING_IN_PYPY
34016   __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
34017   #else
34018   0, /*nb_or*/
34019   #endif
34020   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
34021   0, /*nb_coerce*/
34022   #endif
34023   #if CYTHON_COMPILING_IN_PYPY
34024   __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
34025   #else
34026   0, /*nb_int*/
34027   #endif
34028   #if PY_MAJOR_VERSION < 3
34029   #if CYTHON_COMPILING_IN_PYPY
34030   __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
34031   #else
34032   0, /*nb_long*/
34033   #endif
34034   #else
34035   0, /*reserved*/
34036   #endif
34037   #if CYTHON_COMPILING_IN_PYPY
34038   __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
34039   #else
34040   0, /*nb_float*/
34041   #endif
34042   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
34043   #if CYTHON_COMPILING_IN_PYPY
34044   __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
34045   #else
34046   0, /*nb_oct*/
34047   #endif
34048   #endif
34049   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
34050   #if CYTHON_COMPILING_IN_PYPY
34051   __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
34052   #else
34053   0, /*nb_hex*/
34054   #endif
34055   #endif
34056   0, /*nb_inplace_add*/
34057   0, /*nb_inplace_subtract*/
34058   0, /*nb_inplace_multiply*/
34059   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
34060   0, /*nb_inplace_divide*/
34061   #endif
34062   0, /*nb_inplace_remainder*/
34063   0, /*nb_inplace_power*/
34064   0, /*nb_inplace_lshift*/
34065   0, /*nb_inplace_rshift*/
34066   0, /*nb_inplace_and*/
34067   0, /*nb_inplace_xor*/
34068   0, /*nb_inplace_or*/
34069   0, /*nb_floor_divide*/
34070   #if CYTHON_COMPILING_IN_PYPY
34071   __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
34072   #else
34073   0, /*nb_true_divide*/
34074   #endif
34075   0, /*nb_inplace_floor_divide*/
34076   0, /*nb_inplace_true_divide*/
34077   #if CYTHON_COMPILING_IN_PYPY
34078   __pyx_pw_4lxml_9objectify_10IntElement_3__index__, /*nb_index*/
34079   #else
34080   0, /*nb_index*/
34081   #endif
34082   #if PY_VERSION_HEX >= 0x03050000
34083   0, /*nb_matrix_multiply*/
34084   #endif
34085   #if PY_VERSION_HEX >= 0x03050000
34086   0, /*nb_inplace_matrix_multiply*/
34087   #endif
34088 };
34089
34090 static PyTypeObject __pyx_type_4lxml_9objectify_BoolElement = {
34091   PyVarObject_HEAD_INIT(0, 0)
34092   "lxml.objectify.BoolElement", /*tp_name*/
34093   sizeof(struct __pyx_obj_4lxml_9objectify_BoolElement), /*tp_basicsize*/
34094   0, /*tp_itemsize*/
34095   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
34096   #if PY_VERSION_HEX < 0x030800b4
34097   0, /*tp_print*/
34098   #endif
34099   #if PY_VERSION_HEX >= 0x030800b4
34100   0, /*tp_vectorcall_offset*/
34101   #endif
34102   0, /*tp_getattr*/
34103   0, /*tp_setattr*/
34104   #if PY_MAJOR_VERSION < 3
34105   0, /*tp_compare*/
34106   #endif
34107   #if PY_MAJOR_VERSION >= 3
34108   0, /*tp_as_async*/
34109   #endif
34110   __pyx_pw_4lxml_9objectify_11BoolElement_11__repr__, /*tp_repr*/
34111   &__pyx_tp_as_number_BoolElement, /*tp_as_number*/
34112   0, /*tp_as_sequence*/
34113   0, /*tp_as_mapping*/
34114   __pyx_pw_4lxml_9objectify_11BoolElement_7__hash__, /*tp_hash*/
34115   0, /*tp_call*/
34116   __pyx_pw_4lxml_9objectify_11BoolElement_9__str__, /*tp_str*/
34117   0, /*tp_getattro*/
34118   0, /*tp_setattro*/
34119   0, /*tp_as_buffer*/
34120   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34121   "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*/
34122   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
34123   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
34124   __pyx_pw_4lxml_9objectify_11BoolElement_5__richcmp__, /*tp_richcompare*/
34125   0, /*tp_weaklistoffset*/
34126   #if CYTHON_COMPILING_IN_PYPY
34127   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
34128   #else
34129   0, /*tp_iter*/
34130   #endif
34131   0, /*tp_iternext*/
34132   __pyx_methods_4lxml_9objectify_BoolElement, /*tp_methods*/
34133   0, /*tp_members*/
34134   __pyx_getsets_4lxml_9objectify_BoolElement, /*tp_getset*/
34135   0, /*tp_base*/
34136   0, /*tp_dict*/
34137   0, /*tp_descr_get*/
34138   0, /*tp_descr_set*/
34139   0, /*tp_dictoffset*/
34140   0, /*tp_init*/
34141   0, /*tp_alloc*/
34142   __pyx_tp_new_4lxml_9objectify_BoolElement, /*tp_new*/
34143   0, /*tp_free*/
34144   0, /*tp_is_gc*/
34145   0, /*tp_bases*/
34146   0, /*tp_mro*/
34147   0, /*tp_cache*/
34148   0, /*tp_subclasses*/
34149   0, /*tp_weaklist*/
34150   0, /*tp_del*/
34151   0, /*tp_version_tag*/
34152   #if PY_VERSION_HEX >= 0x030400a1
34153   0, /*tp_finalize*/
34154   #endif
34155   #if PY_VERSION_HEX >= 0x030800b1
34156   0, /*tp_vectorcall*/
34157   #endif
34158   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34159   0, /*tp_print*/
34160   #endif
34161 };
34162
34163 static PyObject *__pyx_tp_new_4lxml_9objectify_PyType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34164   struct __pyx_obj_4lxml_9objectify_PyType *p;
34165   PyObject *o;
34166   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34167     o = (*t->tp_alloc)(t, 0);
34168   } else {
34169     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34170   }
34171   if (unlikely(!o)) return 0;
34172   p = ((struct __pyx_obj_4lxml_9objectify_PyType *)o);
34173   p->name = Py_None; Py_INCREF(Py_None);
34174   p->type_check = Py_None; Py_INCREF(Py_None);
34175   p->stringify = Py_None; Py_INCREF(Py_None);
34176   p->_type = Py_None; Py_INCREF(Py_None);
34177   p->_schema_types = ((PyObject*)Py_None); Py_INCREF(Py_None);
34178   return o;
34179 }
34180
34181 static void __pyx_tp_dealloc_4lxml_9objectify_PyType(PyObject *o) {
34182   struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
34183   #if CYTHON_USE_TP_FINALIZE
34184   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34185     if (PyObject_CallFinalizerFromDealloc(o)) return;
34186   }
34187   #endif
34188   PyObject_GC_UnTrack(o);
34189   Py_CLEAR(p->name);
34190   Py_CLEAR(p->type_check);
34191   Py_CLEAR(p->stringify);
34192   Py_CLEAR(p->_type);
34193   Py_CLEAR(p->_schema_types);
34194   (*Py_TYPE(o)->tp_free)(o);
34195 }
34196
34197 static int __pyx_tp_traverse_4lxml_9objectify_PyType(PyObject *o, visitproc v, void *a) {
34198   int e;
34199   struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
34200   if (p->name) {
34201     e = (*v)(p->name, a); if (e) return e;
34202   }
34203   if (p->type_check) {
34204     e = (*v)(p->type_check, a); if (e) return e;
34205   }
34206   if (p->stringify) {
34207     e = (*v)(p->stringify, a); if (e) return e;
34208   }
34209   if (p->_type) {
34210     e = (*v)(p->_type, a); if (e) return e;
34211   }
34212   if (p->_schema_types) {
34213     e = (*v)(p->_schema_types, a); if (e) return e;
34214   }
34215   return 0;
34216 }
34217
34218 static int __pyx_tp_clear_4lxml_9objectify_PyType(PyObject *o) {
34219   struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
34220   Py_CLEAR(p->name);
34221   Py_CLEAR(p->type_check);
34222   Py_CLEAR(p->stringify);
34223   Py_CLEAR(p->_type);
34224   Py_CLEAR(p->_schema_types);
34225   return 0;
34226 }
34227
34228 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, CYTHON_UNUSED void *x) {
34229   return __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_1__get__(o);
34230 }
34231
34232 static int __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34233   if (v) {
34234     return __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_3__set__(o, v);
34235   }
34236   else {
34237     PyErr_SetString(PyExc_NotImplementedError, "__del__");
34238     return -1;
34239   }
34240 }
34241
34242 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_name(PyObject *o, CYTHON_UNUSED void *x) {
34243   return __pyx_pw_4lxml_9objectify_6PyType_4name_1__get__(o);
34244 }
34245
34246 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_type_check(PyObject *o, CYTHON_UNUSED void *x) {
34247   return __pyx_pw_4lxml_9objectify_6PyType_10type_check_1__get__(o);
34248 }
34249
34250 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_stringify(PyObject *o, CYTHON_UNUSED void *x) {
34251   return __pyx_pw_4lxml_9objectify_6PyType_9stringify_1__get__(o);
34252 }
34253
34254 static PyMethodDef __pyx_methods_4lxml_9objectify_PyType[] = {
34255   {"register", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_6PyType_5register, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_6PyType_4register},
34256   {"unregister", (PyCFunction)__pyx_pw_4lxml_9objectify_6PyType_7unregister, METH_NOARGS, __pyx_doc_4lxml_9objectify_6PyType_6unregister},
34257   {0, 0, 0, 0}
34258 };
34259
34260 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_PyType[] = {
34261   {(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},
34262   {(char *)"name", __pyx_getprop_4lxml_9objectify_6PyType_name, 0, (char *)0, 0},
34263   {(char *)"type_check", __pyx_getprop_4lxml_9objectify_6PyType_type_check, 0, (char *)0, 0},
34264   {(char *)"stringify", __pyx_getprop_4lxml_9objectify_6PyType_stringify, 0, (char *)0, 0},
34265   {0, 0, 0, 0, 0}
34266 };
34267
34268 static PyTypeObject __pyx_type_4lxml_9objectify_PyType = {
34269   PyVarObject_HEAD_INIT(0, 0)
34270   "lxml.objectify.PyType", /*tp_name*/
34271   sizeof(struct __pyx_obj_4lxml_9objectify_PyType), /*tp_basicsize*/
34272   0, /*tp_itemsize*/
34273   __pyx_tp_dealloc_4lxml_9objectify_PyType, /*tp_dealloc*/
34274   #if PY_VERSION_HEX < 0x030800b4
34275   0, /*tp_print*/
34276   #endif
34277   #if PY_VERSION_HEX >= 0x030800b4
34278   0, /*tp_vectorcall_offset*/
34279   #endif
34280   0, /*tp_getattr*/
34281   0, /*tp_setattr*/
34282   #if PY_MAJOR_VERSION < 3
34283   0, /*tp_compare*/
34284   #endif
34285   #if PY_MAJOR_VERSION >= 3
34286   0, /*tp_as_async*/
34287   #endif
34288   __pyx_pw_4lxml_9objectify_6PyType_3__repr__, /*tp_repr*/
34289   0, /*tp_as_number*/
34290   0, /*tp_as_sequence*/
34291   0, /*tp_as_mapping*/
34292   0, /*tp_hash*/
34293   0, /*tp_call*/
34294   0, /*tp_str*/
34295   0, /*tp_getattro*/
34296   0, /*tp_setattro*/
34297   0, /*tp_as_buffer*/
34298   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34299   "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*/
34300   __pyx_tp_traverse_4lxml_9objectify_PyType, /*tp_traverse*/
34301   __pyx_tp_clear_4lxml_9objectify_PyType, /*tp_clear*/
34302   0, /*tp_richcompare*/
34303   0, /*tp_weaklistoffset*/
34304   0, /*tp_iter*/
34305   0, /*tp_iternext*/
34306   __pyx_methods_4lxml_9objectify_PyType, /*tp_methods*/
34307   0, /*tp_members*/
34308   __pyx_getsets_4lxml_9objectify_PyType, /*tp_getset*/
34309   0, /*tp_base*/
34310   0, /*tp_dict*/
34311   0, /*tp_descr_get*/
34312   0, /*tp_descr_set*/
34313   0, /*tp_dictoffset*/
34314   __pyx_pw_4lxml_9objectify_6PyType_1__init__, /*tp_init*/
34315   0, /*tp_alloc*/
34316   __pyx_tp_new_4lxml_9objectify_PyType, /*tp_new*/
34317   0, /*tp_free*/
34318   0, /*tp_is_gc*/
34319   0, /*tp_bases*/
34320   0, /*tp_mro*/
34321   0, /*tp_cache*/
34322   0, /*tp_subclasses*/
34323   0, /*tp_weaklist*/
34324   0, /*tp_del*/
34325   0, /*tp_version_tag*/
34326   #if PY_VERSION_HEX >= 0x030400a1
34327   0, /*tp_finalize*/
34328   #endif
34329   #if PY_VERSION_HEX >= 0x030800b1
34330   0, /*tp_vectorcall*/
34331   #endif
34332   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34333   0, /*tp_print*/
34334   #endif
34335 };
34336
34337 static PyObject *__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34338   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p;
34339   PyObject *o;
34340   o = (*t->tp_alloc)(t, 0);
34341   if (unlikely(!o)) return 0;
34342   p = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o);
34343   p->_tag = Py_None; Py_INCREF(Py_None);
34344   p->_nsmap = Py_None; Py_INCREF(Py_None);
34345   p->_element_factory = Py_None; Py_INCREF(Py_None);
34346   return o;
34347 }
34348
34349 static void __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
34350   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
34351   PyObject_GC_UnTrack(o);
34352   Py_CLEAR(p->_tag);
34353   Py_CLEAR(p->_nsmap);
34354   Py_CLEAR(p->_element_factory);
34355   (*Py_TYPE(o)->tp_free)(o);
34356 }
34357
34358 static int __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o, visitproc v, void *a) {
34359   int e;
34360   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
34361   if (p->_tag) {
34362     e = (*v)(p->_tag, a); if (e) return e;
34363   }
34364   if (p->_nsmap) {
34365     e = (*v)(p->_nsmap, a); if (e) return e;
34366   }
34367   if (p->_element_factory) {
34368     e = (*v)(p->_element_factory, a); if (e) return e;
34369   }
34370   return 0;
34371 }
34372
34373 static int __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
34374   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
34375   Py_CLEAR(p->_tag);
34376   Py_CLEAR(p->_nsmap);
34377   Py_CLEAR(p->_element_factory);
34378   return 0;
34379 }
34380
34381 static PyMethodDef __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller[] = {
34382   {0, 0, 0, 0}
34383 };
34384
34385 static PyTypeObject __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller = {
34386   PyVarObject_HEAD_INIT(0, 0)
34387   "lxml.objectify._ObjectifyElementMakerCaller", /*tp_name*/
34388   sizeof(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller), /*tp_basicsize*/
34389   0, /*tp_itemsize*/
34390   __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_dealloc*/
34391   #if PY_VERSION_HEX < 0x030800b4
34392   0, /*tp_print*/
34393   #endif
34394   #if PY_VERSION_HEX >= 0x030800b4
34395   0, /*tp_vectorcall_offset*/
34396   #endif
34397   0, /*tp_getattr*/
34398   0, /*tp_setattr*/
34399   #if PY_MAJOR_VERSION < 3
34400   0, /*tp_compare*/
34401   #endif
34402   #if PY_MAJOR_VERSION >= 3
34403   0, /*tp_as_async*/
34404   #endif
34405   0, /*tp_repr*/
34406   0, /*tp_as_number*/
34407   0, /*tp_as_sequence*/
34408   0, /*tp_as_mapping*/
34409   0, /*tp_hash*/
34410   __pyx_pw_4lxml_9objectify_28_ObjectifyElementMakerCaller_1__call__, /*tp_call*/
34411   0, /*tp_str*/
34412   0, /*tp_getattro*/
34413   0, /*tp_setattro*/
34414   0, /*tp_as_buffer*/
34415   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34416   0, /*tp_doc*/
34417   __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_traverse*/
34418   __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_clear*/
34419   0, /*tp_richcompare*/
34420   0, /*tp_weaklistoffset*/
34421   0, /*tp_iter*/
34422   0, /*tp_iternext*/
34423   __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_methods*/
34424   0, /*tp_members*/
34425   0, /*tp_getset*/
34426   0, /*tp_base*/
34427   0, /*tp_dict*/
34428   0, /*tp_descr_get*/
34429   0, /*tp_descr_set*/
34430   0, /*tp_dictoffset*/
34431   0, /*tp_init*/
34432   0, /*tp_alloc*/
34433   __pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_new*/
34434   0, /*tp_free*/
34435   0, /*tp_is_gc*/
34436   0, /*tp_bases*/
34437   0, /*tp_mro*/
34438   0, /*tp_cache*/
34439   0, /*tp_subclasses*/
34440   0, /*tp_weaklist*/
34441   0, /*tp_del*/
34442   0, /*tp_version_tag*/
34443   #if PY_VERSION_HEX >= 0x030400a1
34444   0, /*tp_finalize*/
34445   #endif
34446   #if PY_VERSION_HEX >= 0x030800b1
34447   0, /*tp_vectorcall*/
34448   #endif
34449   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34450   0, /*tp_print*/
34451   #endif
34452 };
34453 static struct __pyx_vtabstruct_4lxml_9objectify_ElementMaker __pyx_vtable_4lxml_9objectify_ElementMaker;
34454
34455 static PyObject *__pyx_tp_new_4lxml_9objectify_ElementMaker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34456   struct __pyx_obj_4lxml_9objectify_ElementMaker *p;
34457   PyObject *o;
34458   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34459     o = (*t->tp_alloc)(t, 0);
34460   } else {
34461     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34462   }
34463   if (unlikely(!o)) return 0;
34464   p = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)o);
34465   p->__pyx_vtab = __pyx_vtabptr_4lxml_9objectify_ElementMaker;
34466   p->_makeelement = Py_None; Py_INCREF(Py_None);
34467   p->_namespace = Py_None; Py_INCREF(Py_None);
34468   p->_nsmap = Py_None; Py_INCREF(Py_None);
34469   p->_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
34470   return o;
34471 }
34472
34473 static void __pyx_tp_dealloc_4lxml_9objectify_ElementMaker(PyObject *o) {
34474   struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
34475   #if CYTHON_USE_TP_FINALIZE
34476   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34477     if (PyObject_CallFinalizerFromDealloc(o)) return;
34478   }
34479   #endif
34480   PyObject_GC_UnTrack(o);
34481   Py_CLEAR(p->_makeelement);
34482   Py_CLEAR(p->_namespace);
34483   Py_CLEAR(p->_nsmap);
34484   Py_CLEAR(p->_cache);
34485   (*Py_TYPE(o)->tp_free)(o);
34486 }
34487
34488 static int __pyx_tp_traverse_4lxml_9objectify_ElementMaker(PyObject *o, visitproc v, void *a) {
34489   int e;
34490   struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
34491   if (p->_makeelement) {
34492     e = (*v)(p->_makeelement, a); if (e) return e;
34493   }
34494   if (p->_namespace) {
34495     e = (*v)(p->_namespace, a); if (e) return e;
34496   }
34497   if (p->_nsmap) {
34498     e = (*v)(p->_nsmap, a); if (e) return e;
34499   }
34500   if (p->_cache) {
34501     e = (*v)(p->_cache, a); if (e) return e;
34502   }
34503   return 0;
34504 }
34505
34506 static int __pyx_tp_clear_4lxml_9objectify_ElementMaker(PyObject *o) {
34507   struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
34508   Py_CLEAR(p->_makeelement);
34509   Py_CLEAR(p->_namespace);
34510   Py_CLEAR(p->_nsmap);
34511   Py_CLEAR(p->_cache);
34512   return 0;
34513 }
34514
34515 static PyObject *__pyx_tp_getattro_4lxml_9objectify_ElementMaker(PyObject *o, PyObject *n) {
34516   PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
34517   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
34518     PyErr_Clear();
34519     v = __pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__(o, n);
34520   }
34521   return v;
34522 }
34523
34524 static PyMethodDef __pyx_methods_4lxml_9objectify_ElementMaker[] = {
34525   {"__getattr__", (PyCFunction)__pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__, METH_O|METH_COEXIST, 0},
34526   {0, 0, 0, 0}
34527 };
34528
34529 static PyTypeObject __pyx_type_4lxml_9objectify_ElementMaker = {
34530   PyVarObject_HEAD_INIT(0, 0)
34531   "lxml.objectify.ElementMaker", /*tp_name*/
34532   sizeof(struct __pyx_obj_4lxml_9objectify_ElementMaker), /*tp_basicsize*/
34533   0, /*tp_itemsize*/
34534   __pyx_tp_dealloc_4lxml_9objectify_ElementMaker, /*tp_dealloc*/
34535   #if PY_VERSION_HEX < 0x030800b4
34536   0, /*tp_print*/
34537   #endif
34538   #if PY_VERSION_HEX >= 0x030800b4
34539   0, /*tp_vectorcall_offset*/
34540   #endif
34541   0, /*tp_getattr*/
34542   0, /*tp_setattr*/
34543   #if PY_MAJOR_VERSION < 3
34544   0, /*tp_compare*/
34545   #endif
34546   #if PY_MAJOR_VERSION >= 3
34547   0, /*tp_as_async*/
34548   #endif
34549   0, /*tp_repr*/
34550   0, /*tp_as_number*/
34551   0, /*tp_as_sequence*/
34552   0, /*tp_as_mapping*/
34553   0, /*tp_hash*/
34554   __pyx_pw_4lxml_9objectify_12ElementMaker_5__call__, /*tp_call*/
34555   0, /*tp_str*/
34556   __pyx_tp_getattro_4lxml_9objectify_ElementMaker, /*tp_getattro*/
34557   0, /*tp_setattro*/
34558   0, /*tp_as_buffer*/
34559   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34560   "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*/
34561   __pyx_tp_traverse_4lxml_9objectify_ElementMaker, /*tp_traverse*/
34562   __pyx_tp_clear_4lxml_9objectify_ElementMaker, /*tp_clear*/
34563   0, /*tp_richcompare*/
34564   0, /*tp_weaklistoffset*/
34565   0, /*tp_iter*/
34566   0, /*tp_iternext*/
34567   __pyx_methods_4lxml_9objectify_ElementMaker, /*tp_methods*/
34568   0, /*tp_members*/
34569   0, /*tp_getset*/
34570   0, /*tp_base*/
34571   0, /*tp_dict*/
34572   0, /*tp_descr_get*/
34573   0, /*tp_descr_set*/
34574   0, /*tp_dictoffset*/
34575   __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__, /*tp_init*/
34576   0, /*tp_alloc*/
34577   __pyx_tp_new_4lxml_9objectify_ElementMaker, /*tp_new*/
34578   0, /*tp_free*/
34579   0, /*tp_is_gc*/
34580   0, /*tp_bases*/
34581   0, /*tp_mro*/
34582   0, /*tp_cache*/
34583   0, /*tp_subclasses*/
34584   0, /*tp_weaklist*/
34585   0, /*tp_del*/
34586   0, /*tp_version_tag*/
34587   #if PY_VERSION_HEX >= 0x030400a1
34588   0, /*tp_finalize*/
34589   #endif
34590   #if PY_VERSION_HEX >= 0x030800b1
34591   0, /*tp_vectorcall*/
34592   #endif
34593   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34594   0, /*tp_print*/
34595   #endif
34596 };
34597
34598 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
34599   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p;
34600   PyObject *o = __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_new(t, a, k);
34601   if (unlikely(!o)) return 0;
34602   p = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o);
34603   p->empty_data_class = Py_None; Py_INCREF(Py_None);
34604   p->tree_class = Py_None; Py_INCREF(Py_None);
34605   return o;
34606 }
34607
34608 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
34609   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
34610   #if CYTHON_USE_TP_FINALIZE
34611   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34612     if (PyObject_CallFinalizerFromDealloc(o)) return;
34613   }
34614   #endif
34615   PyObject_GC_UnTrack(o);
34616   Py_CLEAR(p->empty_data_class);
34617   Py_CLEAR(p->tree_class);
34618   #if CYTHON_USE_TYPE_SLOTS
34619   if (PyType_IS_GC(Py_TYPE(o)->tp_base))
34620   #endif
34621   PyObject_GC_Track(o);
34622   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);
34623 }
34624
34625 static int __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o, visitproc v, void *a) {
34626   int e;
34627   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
34628   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;
34629   if (p->empty_data_class) {
34630     e = (*v)(p->empty_data_class, a); if (e) return e;
34631   }
34632   if (p->tree_class) {
34633     e = (*v)(p->tree_class, a); if (e) return e;
34634   }
34635   return 0;
34636 }
34637
34638 static int __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
34639   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
34640   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);
34641   Py_CLEAR(p->empty_data_class);
34642   Py_CLEAR(p->tree_class);
34643   return 0;
34644 }
34645
34646 static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup[] = {
34647   {0, 0, 0, 0}
34648 };
34649
34650 static PyTypeObject __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup = {
34651   PyVarObject_HEAD_INIT(0, 0)
34652   "lxml.objectify.ObjectifyElementClassLookup", /*tp_name*/
34653   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup), /*tp_basicsize*/
34654   0, /*tp_itemsize*/
34655   __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_dealloc*/
34656   #if PY_VERSION_HEX < 0x030800b4
34657   0, /*tp_print*/
34658   #endif
34659   #if PY_VERSION_HEX >= 0x030800b4
34660   0, /*tp_vectorcall_offset*/
34661   #endif
34662   0, /*tp_getattr*/
34663   0, /*tp_setattr*/
34664   #if PY_MAJOR_VERSION < 3
34665   0, /*tp_compare*/
34666   #endif
34667   #if PY_MAJOR_VERSION >= 3
34668   0, /*tp_as_async*/
34669   #endif
34670   0, /*tp_repr*/
34671   0, /*tp_as_number*/
34672   0, /*tp_as_sequence*/
34673   0, /*tp_as_mapping*/
34674   0, /*tp_hash*/
34675   0, /*tp_call*/
34676   0, /*tp_str*/
34677   0, /*tp_getattro*/
34678   0, /*tp_setattro*/
34679   0, /*tp_as_buffer*/
34680   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34681   "ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)\n    Element class lookup method that uses the objectify classes.\n    ", /*tp_doc*/
34682   __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_traverse*/
34683   __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_clear*/
34684   0, /*tp_richcompare*/
34685   0, /*tp_weaklistoffset*/
34686   0, /*tp_iter*/
34687   0, /*tp_iternext*/
34688   __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_methods*/
34689   0, /*tp_members*/
34690   0, /*tp_getset*/
34691   0, /*tp_base*/
34692   0, /*tp_dict*/
34693   0, /*tp_descr_get*/
34694   0, /*tp_descr_set*/
34695   0, /*tp_dictoffset*/
34696   __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__, /*tp_init*/
34697   0, /*tp_alloc*/
34698   __pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_new*/
34699   0, /*tp_free*/
34700   0, /*tp_is_gc*/
34701   0, /*tp_bases*/
34702   0, /*tp_mro*/
34703   0, /*tp_cache*/
34704   0, /*tp_subclasses*/
34705   0, /*tp_weaklist*/
34706   0, /*tp_del*/
34707   0, /*tp_version_tag*/
34708   #if PY_VERSION_HEX >= 0x030400a1
34709   0, /*tp_finalize*/
34710   #endif
34711   #if PY_VERSION_HEX >= 0x030800b1
34712   0, /*tp_vectorcall*/
34713   #endif
34714   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34715   0, /*tp_print*/
34716   #endif
34717 };
34718
34719 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectPath(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34720   struct __pyx_obj_4lxml_9objectify_ObjectPath *p;
34721   PyObject *o;
34722   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34723     o = (*t->tp_alloc)(t, 0);
34724   } else {
34725     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34726   }
34727   if (unlikely(!o)) return 0;
34728   p = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)o);
34729   p->find = Py_None; Py_INCREF(Py_None);
34730   p->_path = ((PyObject*)Py_None); Py_INCREF(Py_None);
34731   p->_path_str = Py_None; Py_INCREF(Py_None);
34732   return o;
34733 }
34734
34735 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectPath(PyObject *o) {
34736   struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
34737   #if CYTHON_USE_TP_FINALIZE
34738   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34739     if (PyObject_CallFinalizerFromDealloc(o)) return;
34740   }
34741   #endif
34742   PyObject_GC_UnTrack(o);
34743   {
34744     PyObject *etype, *eval, *etb;
34745     PyErr_Fetch(&etype, &eval, &etb);
34746     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
34747     __pyx_pw_4lxml_9objectify_10ObjectPath_3__dealloc__(o);
34748     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
34749     PyErr_Restore(etype, eval, etb);
34750   }
34751   Py_CLEAR(p->find);
34752   Py_CLEAR(p->_path);
34753   Py_CLEAR(p->_path_str);
34754   (*Py_TYPE(o)->tp_free)(o);
34755 }
34756
34757 static int __pyx_tp_traverse_4lxml_9objectify_ObjectPath(PyObject *o, visitproc v, void *a) {
34758   int e;
34759   struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
34760   if (p->find) {
34761     e = (*v)(p->find, a); if (e) return e;
34762   }
34763   if (p->_path) {
34764     e = (*v)(p->_path, a); if (e) return e;
34765   }
34766   if (p->_path_str) {
34767     e = (*v)(p->_path_str, a); if (e) return e;
34768   }
34769   return 0;
34770 }
34771
34772 static int __pyx_tp_clear_4lxml_9objectify_ObjectPath(PyObject *o) {
34773   struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
34774   Py_CLEAR(p->find);
34775   Py_CLEAR(p->_path);
34776   Py_CLEAR(p->_path_str);
34777   return 0;
34778 }
34779
34780 static PyObject *__pyx_getprop_4lxml_9objectify_10ObjectPath_find(PyObject *o, CYTHON_UNUSED void *x) {
34781   return __pyx_pw_4lxml_9objectify_10ObjectPath_4find_1__get__(o);
34782 }
34783
34784 static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectPath[] = {
34785   {"hasattr", (PyCFunction)__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr, METH_O, __pyx_doc_4lxml_9objectify_10ObjectPath_8hasattr},
34786   {"setattr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_10ObjectPath_10setattr},
34787   {"addattr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_10ObjectPath_12addattr},
34788   {0, 0, 0, 0}
34789 };
34790
34791 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectPath[] = {
34792   {(char *)"find", __pyx_getprop_4lxml_9objectify_10ObjectPath_find, 0, (char *)0, 0},
34793   {0, 0, 0, 0, 0}
34794 };
34795
34796 static PyTypeObject __pyx_type_4lxml_9objectify_ObjectPath = {
34797   PyVarObject_HEAD_INIT(0, 0)
34798   "lxml.objectify.ObjectPath", /*tp_name*/
34799   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectPath), /*tp_basicsize*/
34800   0, /*tp_itemsize*/
34801   __pyx_tp_dealloc_4lxml_9objectify_ObjectPath, /*tp_dealloc*/
34802   #if PY_VERSION_HEX < 0x030800b4
34803   0, /*tp_print*/
34804   #endif
34805   #if PY_VERSION_HEX >= 0x030800b4
34806   0, /*tp_vectorcall_offset*/
34807   #endif
34808   0, /*tp_getattr*/
34809   0, /*tp_setattr*/
34810   #if PY_MAJOR_VERSION < 3
34811   0, /*tp_compare*/
34812   #endif
34813   #if PY_MAJOR_VERSION >= 3
34814   0, /*tp_as_async*/
34815   #endif
34816   0, /*tp_repr*/
34817   0, /*tp_as_number*/
34818   0, /*tp_as_sequence*/
34819   0, /*tp_as_mapping*/
34820   0, /*tp_hash*/
34821   __pyx_pw_4lxml_9objectify_10ObjectPath_7__call__, /*tp_call*/
34822   __pyx_pw_4lxml_9objectify_10ObjectPath_5__str__, /*tp_str*/
34823   0, /*tp_getattro*/
34824   0, /*tp_setattro*/
34825   0, /*tp_as_buffer*/
34826   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34827   "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*/
34828   __pyx_tp_traverse_4lxml_9objectify_ObjectPath, /*tp_traverse*/
34829   __pyx_tp_clear_4lxml_9objectify_ObjectPath, /*tp_clear*/
34830   0, /*tp_richcompare*/
34831   0, /*tp_weaklistoffset*/
34832   0, /*tp_iter*/
34833   0, /*tp_iternext*/
34834   __pyx_methods_4lxml_9objectify_ObjectPath, /*tp_methods*/
34835   0, /*tp_members*/
34836   __pyx_getsets_4lxml_9objectify_ObjectPath, /*tp_getset*/
34837   0, /*tp_base*/
34838   0, /*tp_dict*/
34839   0, /*tp_descr_get*/
34840   0, /*tp_descr_set*/
34841   0, /*tp_dictoffset*/
34842   __pyx_pw_4lxml_9objectify_10ObjectPath_1__init__, /*tp_init*/
34843   0, /*tp_alloc*/
34844   __pyx_tp_new_4lxml_9objectify_ObjectPath, /*tp_new*/
34845   0, /*tp_free*/
34846   0, /*tp_is_gc*/
34847   0, /*tp_bases*/
34848   0, /*tp_mro*/
34849   0, /*tp_cache*/
34850   0, /*tp_subclasses*/
34851   0, /*tp_weaklist*/
34852   0, /*tp_del*/
34853   0, /*tp_version_tag*/
34854   #if PY_VERSION_HEX >= 0x030400a1
34855   0, /*tp_finalize*/
34856   #endif
34857   #if PY_VERSION_HEX >= 0x030800b1
34858   0, /*tp_vectorcall*/
34859   #endif
34860   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34861   0, /*tp_print*/
34862   #endif
34863 };
34864
34865 static PyMethodDef __pyx_methods[] = {
34866   {0, 0, 0, 0}
34867 };
34868
34869 #if PY_MAJOR_VERSION >= 3
34870 #if CYTHON_PEP489_MULTI_PHASE_INIT
34871 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
34872 static int __pyx_pymod_exec_objectify(PyObject* module); /*proto*/
34873 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
34874   {Py_mod_create, (void*)__pyx_pymod_create},
34875   {Py_mod_exec, (void*)__pyx_pymod_exec_objectify},
34876   {0, NULL}
34877 };
34878 #endif
34879
34880 static struct PyModuleDef __pyx_moduledef = {
34881     PyModuleDef_HEAD_INIT,
34882     "objectify",
34883     __pyx_k_The_lxml_objectify_module_imple, /* m_doc */
34884   #if CYTHON_PEP489_MULTI_PHASE_INIT
34885     0, /* m_size */
34886   #else
34887     -1, /* m_size */
34888   #endif
34889     __pyx_methods /* m_methods */,
34890   #if CYTHON_PEP489_MULTI_PHASE_INIT
34891     __pyx_moduledef_slots, /* m_slots */
34892   #else
34893     NULL, /* m_reload */
34894   #endif
34895     NULL, /* m_traverse */
34896     NULL, /* m_clear */
34897     (freefunc)__pyx_module_cleanup /* m_free */
34898 };
34899 #endif
34900 #ifndef CYTHON_SMALL_CODE
34901 #if defined(__clang__)
34902     #define CYTHON_SMALL_CODE
34903 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
34904     #define CYTHON_SMALL_CODE __attribute__((cold))
34905 #else
34906     #define CYTHON_SMALL_CODE
34907 #endif
34908 #endif
34909
34910 static __Pyx_StringTabEntry __pyx_string_tab[] = {
34911   {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
34912   {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
34913   {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
34914   {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
34915   {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
34916   {&__pyx_n_s_BoolElement, __pyx_k_BoolElement, sizeof(__pyx_k_BoolElement), 0, 0, 1, 1},
34917   {&__pyx_n_u_BoolElement, __pyx_k_BoolElement, sizeof(__pyx_k_BoolElement), 0, 1, 0, 1},
34918   {&__pyx_n_s_BoolElement__init, __pyx_k_BoolElement__init, sizeof(__pyx_k_BoolElement__init), 0, 0, 1, 1},
34919   {&__pyx_kp_u_Cannot_register_tree_type, __pyx_k_Cannot_register_tree_type, sizeof(__pyx_k_Cannot_register_tree_type), 0, 1, 0, 0},
34920   {&__pyx_n_s_DataElement, __pyx_k_DataElement, sizeof(__pyx_k_DataElement), 0, 0, 1, 1},
34921   {&__pyx_n_u_DataElement, __pyx_k_DataElement, sizeof(__pyx_k_DataElement), 0, 1, 0, 1},
34922   {&__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},
34923   {&__pyx_n_s_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 1, 1},
34924   {&__pyx_n_u_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 1, 0, 1},
34925   {&__pyx_n_u_ENTITY, __pyx_k_ENTITY, sizeof(__pyx_k_ENTITY), 0, 1, 0, 1},
34926   {&__pyx_n_s_Element, __pyx_k_Element, sizeof(__pyx_k_Element), 0, 0, 1, 1},
34927   {&__pyx_n_u_Element, __pyx_k_Element, sizeof(__pyx_k_Element), 0, 1, 0, 1},
34928   {&__pyx_n_s_ElementChildIterator, __pyx_k_ElementChildIterator, sizeof(__pyx_k_ElementChildIterator), 0, 0, 1, 1},
34929   {&__pyx_n_s_ElementMaker, __pyx_k_ElementMaker, sizeof(__pyx_k_ElementMaker), 0, 0, 1, 1},
34930   {&__pyx_n_u_ElementMaker, __pyx_k_ElementMaker, sizeof(__pyx_k_ElementMaker), 0, 1, 0, 1},
34931   {&__pyx_n_s_ElementTree, __pyx_k_ElementTree, sizeof(__pyx_k_ElementTree), 0, 0, 1, 1},
34932   {&__pyx_n_s_ElementTree_2, __pyx_k_ElementTree_2, sizeof(__pyx_k_ElementTree_2), 0, 0, 1, 1},
34933   {&__pyx_n_s_FloatElement, __pyx_k_FloatElement, sizeof(__pyx_k_FloatElement), 0, 0, 1, 1},
34934   {&__pyx_n_u_FloatElement, __pyx_k_FloatElement, sizeof(__pyx_k_FloatElement), 0, 1, 0, 1},
34935   {&__pyx_n_s_FloatElement__init, __pyx_k_FloatElement__init, sizeof(__pyx_k_FloatElement__init), 0, 0, 1, 1},
34936   {&__pyx_n_u_ID, __pyx_k_ID, sizeof(__pyx_k_ID), 0, 1, 0, 1},
34937   {&__pyx_n_u_IDREF, __pyx_k_IDREF, sizeof(__pyx_k_IDREF), 0, 1, 0, 1},
34938   {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
34939   {&__pyx_n_s_IntElement, __pyx_k_IntElement, sizeof(__pyx_k_IntElement), 0, 0, 1, 1},
34940   {&__pyx_n_u_IntElement, __pyx_k_IntElement, sizeof(__pyx_k_IntElement), 0, 1, 0, 1},
34941   {&__pyx_n_s_IntElement__init, __pyx_k_IntElement__init, sizeof(__pyx_k_IntElement__init), 0, 0, 1, 1},
34942   {&__pyx_kp_u_Invalid_boolean_value, __pyx_k_Invalid_boolean_value, sizeof(__pyx_k_Invalid_boolean_value), 0, 1, 0, 0},
34943   {&__pyx_kp_u_Invalid_slice, __pyx_k_Invalid_slice, sizeof(__pyx_k_Invalid_slice), 0, 1, 0, 0},
34944   {&__pyx_n_s_LongElement, __pyx_k_LongElement, sizeof(__pyx_k_LongElement), 0, 0, 1, 1},
34945   {&__pyx_n_u_LongElement, __pyx_k_LongElement, sizeof(__pyx_k_LongElement), 0, 1, 0, 1},
34946   {&__pyx_n_s_LongElement__init, __pyx_k_LongElement__init, sizeof(__pyx_k_LongElement__init), 0, 0, 1, 1},
34947   {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
34948   {&__pyx_n_u_NCName, __pyx_k_NCName, sizeof(__pyx_k_NCName), 0, 1, 0, 1},
34949   {&__pyx_n_u_NMTOKEN, __pyx_k_NMTOKEN, sizeof(__pyx_k_NMTOKEN), 0, 1, 0, 1},
34950   {&__pyx_n_u_Name, __pyx_k_Name, sizeof(__pyx_k_Name), 0, 1, 0, 1},
34951   {&__pyx_n_s_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 0, 1, 1},
34952   {&__pyx_n_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 1},
34953   {&__pyx_n_s_NoneElement, __pyx_k_NoneElement, sizeof(__pyx_k_NoneElement), 0, 0, 1, 1},
34954   {&__pyx_n_u_NoneElement, __pyx_k_NoneElement, sizeof(__pyx_k_NoneElement), 0, 1, 0, 1},
34955   {&__pyx_n_s_NoneType, __pyx_k_NoneType, sizeof(__pyx_k_NoneType), 0, 0, 1, 1},
34956   {&__pyx_n_u_NoneType, __pyx_k_NoneType, sizeof(__pyx_k_NoneType), 0, 1, 0, 1},
34957   {&__pyx_n_s_NumberElement, __pyx_k_NumberElement, sizeof(__pyx_k_NumberElement), 0, 0, 1, 1},
34958   {&__pyx_n_u_NumberElement, __pyx_k_NumberElement, sizeof(__pyx_k_NumberElement), 0, 1, 0, 1},
34959   {&__pyx_n_s_NumberElement___complex, __pyx_k_NumberElement___complex, sizeof(__pyx_k_NumberElement___complex), 0, 0, 1, 1},
34960   {&__pyx_n_s_NumberElement__setValueParser, __pyx_k_NumberElement__setValueParser, sizeof(__pyx_k_NumberElement__setValueParser), 0, 0, 1, 1},
34961   {&__pyx_n_s_ObjectPath, __pyx_k_ObjectPath, sizeof(__pyx_k_ObjectPath), 0, 0, 1, 1},
34962   {&__pyx_n_u_ObjectPath, __pyx_k_ObjectPath, sizeof(__pyx_k_ObjectPath), 0, 1, 0, 1},
34963   {&__pyx_n_s_ObjectPath_addattr, __pyx_k_ObjectPath_addattr, sizeof(__pyx_k_ObjectPath_addattr), 0, 0, 1, 1},
34964   {&__pyx_n_s_ObjectPath_hasattr, __pyx_k_ObjectPath_hasattr, sizeof(__pyx_k_ObjectPath_hasattr), 0, 0, 1, 1},
34965   {&__pyx_n_s_ObjectPath_setattr, __pyx_k_ObjectPath_setattr, sizeof(__pyx_k_ObjectPath_setattr), 0, 0, 1, 1},
34966   {&__pyx_n_s_ObjectifiedDataElement, __pyx_k_ObjectifiedDataElement, sizeof(__pyx_k_ObjectifiedDataElement), 0, 0, 1, 1},
34967   {&__pyx_n_u_ObjectifiedDataElement, __pyx_k_ObjectifiedDataElement, sizeof(__pyx_k_ObjectifiedDataElement), 0, 1, 0, 1},
34968   {&__pyx_n_s_ObjectifiedDataElement__setText, __pyx_k_ObjectifiedDataElement__setText, sizeof(__pyx_k_ObjectifiedDataElement__setText), 0, 0, 1, 1},
34969   {&__pyx_n_s_ObjectifiedElement, __pyx_k_ObjectifiedElement, sizeof(__pyx_k_ObjectifiedElement), 0, 0, 1, 1},
34970   {&__pyx_n_u_ObjectifiedElement, __pyx_k_ObjectifiedElement, sizeof(__pyx_k_ObjectifiedElement), 0, 1, 0, 1},
34971   {&__pyx_n_s_ObjectifiedElement___reduce, __pyx_k_ObjectifiedElement___reduce, sizeof(__pyx_k_ObjectifiedElement___reduce), 0, 0, 1, 1},
34972   {&__pyx_n_s_ObjectifiedElement_addattr, __pyx_k_ObjectifiedElement_addattr, sizeof(__pyx_k_ObjectifiedElement_addattr), 0, 0, 1, 1},
34973   {&__pyx_n_s_ObjectifiedElement_countchildren, __pyx_k_ObjectifiedElement_countchildren, sizeof(__pyx_k_ObjectifiedElement_countchildren), 0, 0, 1, 1},
34974   {&__pyx_n_s_ObjectifiedElement_descendantpat, __pyx_k_ObjectifiedElement_descendantpat, sizeof(__pyx_k_ObjectifiedElement_descendantpat), 0, 0, 1, 1},
34975   {&__pyx_n_s_ObjectifiedElement_getchildren, __pyx_k_ObjectifiedElement_getchildren, sizeof(__pyx_k_ObjectifiedElement_getchildren), 0, 0, 1, 1},
34976   {&__pyx_n_s_ObjectifyElementClassLookup, __pyx_k_ObjectifyElementClassLookup, sizeof(__pyx_k_ObjectifyElementClassLookup), 0, 0, 1, 1},
34977   {&__pyx_n_u_ObjectifyElementClassLookup, __pyx_k_ObjectifyElementClassLookup, sizeof(__pyx_k_ObjectifyElementClassLookup), 0, 1, 0, 1},
34978   {&__pyx_n_s_PYTYPE_ATTRIBUTE, __pyx_k_PYTYPE_ATTRIBUTE, sizeof(__pyx_k_PYTYPE_ATTRIBUTE), 0, 0, 1, 1},
34979   {&__pyx_n_u_PYTYPE_ATTRIBUTE, __pyx_k_PYTYPE_ATTRIBUTE, sizeof(__pyx_k_PYTYPE_ATTRIBUTE), 0, 1, 0, 1},
34980   {&__pyx_n_s_PyType, __pyx_k_PyType, sizeof(__pyx_k_PyType), 0, 0, 1, 1},
34981   {&__pyx_n_u_PyType, __pyx_k_PyType, sizeof(__pyx_k_PyType), 0, 1, 0, 1},
34982   {&__pyx_n_s_PyType_register, __pyx_k_PyType_register, sizeof(__pyx_k_PyType_register), 0, 0, 1, 1},
34983   {&__pyx_kp_s_PyType_s_s, __pyx_k_PyType_s_s, sizeof(__pyx_k_PyType_s_s), 0, 0, 1, 0},
34984   {&__pyx_n_s_PyType_unregister, __pyx_k_PyType_unregister, sizeof(__pyx_k_PyType_unregister), 0, 0, 1, 1},
34985   {&__pyx_n_s_StringElement, __pyx_k_StringElement, sizeof(__pyx_k_StringElement), 0, 0, 1, 1},
34986   {&__pyx_n_u_StringElement, __pyx_k_StringElement, sizeof(__pyx_k_StringElement), 0, 1, 0, 1},
34987   {&__pyx_n_s_StringElement___complex, __pyx_k_StringElement___complex, sizeof(__pyx_k_StringElement___complex), 0, 0, 1, 1},
34988   {&__pyx_n_s_StringElement_strlen, __pyx_k_StringElement_strlen, sizeof(__pyx_k_StringElement_strlen), 0, 0, 1, 1},
34989   {&__pyx_n_s_SubElement, __pyx_k_SubElement, sizeof(__pyx_k_SubElement), 0, 0, 1, 1},
34990   {&__pyx_n_u_SubElement, __pyx_k_SubElement, sizeof(__pyx_k_SubElement), 0, 1, 0, 1},
34991   {&__pyx_n_u_TREE, __pyx_k_TREE, sizeof(__pyx_k_TREE), 0, 1, 0, 1},
34992   {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
34993   {&__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},
34994   {&__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},
34995   {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1},
34996   {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
34997   {&__pyx_n_s_XML, __pyx_k_XML, sizeof(__pyx_k_XML), 0, 0, 1, 1},
34998   {&__pyx_n_u_XML, __pyx_k_XML, sizeof(__pyx_k_XML), 0, 1, 0, 1},
34999   {&__pyx_n_s_XMLParser, __pyx_k_XMLParser, sizeof(__pyx_k_XMLParser), 0, 0, 1, 1},
35000   {&__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},
35001   {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0},
35002   {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0},
35003   {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0},
35004   {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0},
35005   {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0},
35006   {&__pyx_kp_u__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 1, 0, 0},
35007   {&__pyx_kp_b__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 0, 0},
35008   {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0},
35009   {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
35010   {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
35011   {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0},
35012   {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0},
35013   {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0},
35014   {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
35015   {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
35016   {&__pyx_n_s_addattr, __pyx_k_addattr, sizeof(__pyx_k_addattr), 0, 0, 1, 1},
35017   {&__pyx_n_s_addnext, __pyx_k_addnext, sizeof(__pyx_k_addnext), 0, 0, 1, 1},
35018   {&__pyx_n_s_after, __pyx_k_after, sizeof(__pyx_k_after), 0, 0, 1, 1},
35019   {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
35020   {&__pyx_n_s_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 0, 0, 1, 1},
35021   {&__pyx_n_u_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 0, 1, 0, 1},
35022   {&__pyx_n_s_annotate_pytype, __pyx_k_annotate_pytype, sizeof(__pyx_k_annotate_pytype), 0, 0, 1, 1},
35023   {&__pyx_n_s_annotate_xsi, __pyx_k_annotate_xsi, sizeof(__pyx_k_annotate_xsi), 0, 0, 1, 1},
35024   {&__pyx_kp_u_argument_of_makeelement_paramete, __pyx_k_argument_of_makeelement_paramete, sizeof(__pyx_k_argument_of_makeelement_paramete), 0, 1, 0, 0},
35025   {&__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},
35026   {&__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},
35027   {&__pyx_n_s_attrib, __pyx_k_attrib, sizeof(__pyx_k_attrib), 0, 0, 1, 1},
35028   {&__pyx_kp_u_attribute, __pyx_k_attribute, sizeof(__pyx_k_attribute), 0, 1, 0, 0},
35029   {&__pyx_n_s_attribute_names, __pyx_k_attribute_names, sizeof(__pyx_k_attribute_names), 0, 0, 1, 1},
35030   {&__pyx_n_s_attribute_tag, __pyx_k_attribute_tag, sizeof(__pyx_k_attribute_tag), 0, 0, 1, 1},
35031   {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
35032   {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
35033   {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
35034   {&__pyx_n_u_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 1, 0, 1},
35035   {&__pyx_n_s_base_url, __pyx_k_base_url, sizeof(__pyx_k_base_url), 0, 0, 1, 1},
35036   {&__pyx_n_s_before, __pyx_k_before, sizeof(__pyx_k_before), 0, 0, 1, 1},
35037   {&__pyx_n_u_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 1, 0, 1},
35038   {&__pyx_n_u_boolean, __pyx_k_boolean, sizeof(__pyx_k_boolean), 0, 1, 0, 1},
35039   {&__pyx_n_u_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 0, 1, 0, 1},
35040   {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
35041   {&__pyx_n_s_c_node, __pyx_k_c_node, sizeof(__pyx_k_c_node), 0, 0, 1, 1},
35042   {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
35043   {&__pyx_kp_u_cannot_update_root_node, __pyx_k_cannot_update_root_node, sizeof(__pyx_k_cannot_update_root_node), 0, 1, 0, 0},
35044   {&__pyx_n_s_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 0, 1, 1},
35045   {&__pyx_n_s_checkBool, __pyx_k_checkBool, sizeof(__pyx_k_checkBool), 0, 0, 1, 1},
35046   {&__pyx_n_s_cleanup_namespaces, __pyx_k_cleanup_namespaces, sizeof(__pyx_k_cleanup_namespaces), 0, 0, 1, 1},
35047   {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
35048   {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
35049   {&__pyx_n_s_complex, __pyx_k_complex, sizeof(__pyx_k_complex), 0, 0, 1, 1},
35050   {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
35051   {&__pyx_n_s_copy_reg, __pyx_k_copy_reg, sizeof(__pyx_k_copy_reg), 0, 0, 1, 1},
35052   {&__pyx_n_s_copyreg, __pyx_k_copyreg, sizeof(__pyx_k_copyreg), 0, 0, 1, 1},
35053   {&__pyx_n_s_countchildren, __pyx_k_countchildren, sizeof(__pyx_k_countchildren), 0, 0, 1, 1},
35054   {&__pyx_kp_u_creating_indexed_path_attributes, __pyx_k_creating_indexed_path_attributes, sizeof(__pyx_k_creating_indexed_path_attributes), 0, 1, 0, 0},
35055   {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
35056   {&__pyx_n_s_deannotate, __pyx_k_deannotate, sizeof(__pyx_k_deannotate), 0, 0, 1, 1},
35057   {&__pyx_n_u_deannotate, __pyx_k_deannotate, sizeof(__pyx_k_deannotate), 0, 1, 0, 1},
35058   {&__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},
35059   {&__pyx_n_s_descendantpaths, __pyx_k_descendantpaths, sizeof(__pyx_k_descendantpaths), 0, 0, 1, 1},
35060   {&__pyx_n_u_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 1, 0, 1},
35061   {&__pyx_n_s_dump, __pyx_k_dump, sizeof(__pyx_k_dump), 0, 0, 1, 1},
35062   {&__pyx_n_u_dump, __pyx_k_dump, sizeof(__pyx_k_dump), 0, 1, 0, 1},
35063   {&__pyx_n_s_element, __pyx_k_element, sizeof(__pyx_k_element), 0, 0, 1, 1},
35064   {&__pyx_n_s_element_or_tree, __pyx_k_element_or_tree, sizeof(__pyx_k_element_or_tree), 0, 0, 1, 1},
35065   {&__pyx_n_s_empty_data_class, __pyx_k_empty_data_class, sizeof(__pyx_k_empty_data_class), 0, 0, 1, 1},
35066   {&__pyx_n_s_empty_pytype, __pyx_k_empty_pytype, sizeof(__pyx_k_empty_pytype), 0, 0, 1, 1},
35067   {&__pyx_n_s_empty_type, __pyx_k_empty_type, sizeof(__pyx_k_empty_type), 0, 0, 1, 1},
35068   {&__pyx_n_s_enable_recursive_str, __pyx_k_enable_recursive_str, sizeof(__pyx_k_enable_recursive_str), 0, 0, 1, 1},
35069   {&__pyx_n_u_enable_recursive_str, __pyx_k_enable_recursive_str, sizeof(__pyx_k_enable_recursive_str), 0, 1, 0, 1},
35070   {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
35071   {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
35072   {&__pyx_n_s_entry, __pyx_k_entry, sizeof(__pyx_k_entry), 0, 0, 1, 1},
35073   {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
35074   {&__pyx_n_s_etree, __pyx_k_etree, sizeof(__pyx_k_etree), 0, 0, 1, 1},
35075   {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
35076   {&__pyx_n_s_false, __pyx_k_false, sizeof(__pyx_k_false), 0, 0, 1, 1},
35077   {&__pyx_n_u_false, __pyx_k_false, sizeof(__pyx_k_false), 0, 1, 0, 1},
35078   {&__pyx_n_s_first_pos, __pyx_k_first_pos, sizeof(__pyx_k_first_pos), 0, 0, 1, 1},
35079   {&__pyx_n_u_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 1, 0, 1},
35080   {&__pyx_n_s_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 0, 0, 1, 1},
35081   {&__pyx_n_u_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 0, 1, 0, 1},
35082   {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1},
35083   {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
35084   {&__pyx_n_s_getRegisteredTypes, __pyx_k_getRegisteredTypes, sizeof(__pyx_k_getRegisteredTypes), 0, 0, 1, 1},
35085   {&__pyx_n_u_getRegisteredTypes, __pyx_k_getRegisteredTypes, sizeof(__pyx_k_getRegisteredTypes), 0, 1, 0, 1},
35086   {&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1},
35087   {&__pyx_n_s_getchildren, __pyx_k_getchildren, sizeof(__pyx_k_getchildren), 0, 0, 1, 1},
35088   {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
35089   {&__pyx_n_s_getparent, __pyx_k_getparent, sizeof(__pyx_k_getparent), 0, 0, 1, 1},
35090   {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0},
35091   {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
35092   {&__pyx_n_s_hasattr, __pyx_k_hasattr, sizeof(__pyx_k_hasattr), 0, 0, 1, 1},
35093   {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1},
35094   {&__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},
35095   {&__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},
35096   {&__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},
35097   {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
35098   {&__pyx_n_s_ignore_old, __pyx_k_ignore_old, sizeof(__pyx_k_ignore_old), 0, 0, 1, 1},
35099   {&__pyx_n_s_ignore_pytype, __pyx_k_ignore_pytype, sizeof(__pyx_k_ignore_pytype), 0, 0, 1, 1},
35100   {&__pyx_n_s_ignore_xsi, __pyx_k_ignore_xsi, sizeof(__pyx_k_ignore_xsi), 0, 0, 1, 1},
35101   {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
35102   {&__pyx_kp_u_inconsistent_before_after_depend, __pyx_k_inconsistent_before_after_depend, sizeof(__pyx_k_inconsistent_before_after_depend), 0, 1, 0, 0},
35103   {&__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},
35104   {&__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},
35105   {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
35106   {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 1, 0, 1},
35107   {&__pyx_n_u_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 0, 1, 0, 1},
35108   {&__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},
35109   {&__pyx_kp_u_invalid_path, __pyx_k_invalid_path, sizeof(__pyx_k_invalid_path), 0, 1, 0, 0},
35110   {&__pyx_kp_u_invalid_types_for_operator, __pyx_k_invalid_types_for_operator, sizeof(__pyx_k_invalid_types_for_operator), 0, 1, 0, 0},
35111   {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
35112   {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
35113   {&__pyx_n_s_iterchildren, __pyx_k_iterchildren, sizeof(__pyx_k_iterchildren), 0, 0, 1, 1},
35114   {&__pyx_n_s_known, __pyx_k_known, sizeof(__pyx_k_known), 0, 0, 1, 1},
35115   {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
35116   {&__pyx_n_u_language, __pyx_k_language, sizeof(__pyx_k_language), 0, 1, 0, 1},
35117   {&__pyx_n_s_last_pos, __pyx_k_last_pos, sizeof(__pyx_k_last_pos), 0, 0, 1, 1},
35118   {&__pyx_n_u_long, __pyx_k_long, sizeof(__pyx_k_long), 0, 1, 0, 1},
35119   {&__pyx_n_s_lower_bool, __pyx_k_lower_bool, sizeof(__pyx_k_lower_bool), 0, 0, 1, 1},
35120   {&__pyx_n_s_lxml, __pyx_k_lxml, sizeof(__pyx_k_lxml), 0, 0, 1, 1},
35121   {&__pyx_n_s_lxml_objectify, __pyx_k_lxml_objectify, sizeof(__pyx_k_lxml_objectify), 0, 0, 1, 1},
35122   {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
35123   {&__pyx_n_s_makeelement, __pyx_k_makeelement, sizeof(__pyx_k_makeelement), 0, 0, 1, 1},
35124   {&__pyx_n_s_makeparser, __pyx_k_makeparser, sizeof(__pyx_k_makeparser), 0, 0, 1, 1},
35125   {&__pyx_n_u_makeparser, __pyx_k_makeparser, sizeof(__pyx_k_makeparser), 0, 1, 0, 1},
35126   {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
35127   {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1},
35128   {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
35129   {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
35130   {&__pyx_n_s_namespace, __pyx_k_namespace, sizeof(__pyx_k_namespace), 0, 0, 1, 1},
35131   {&__pyx_n_u_negativeInteger, __pyx_k_negativeInteger, sizeof(__pyx_k_negativeInteger), 0, 1, 0, 1},
35132   {&__pyx_n_s_new_parser, __pyx_k_new_parser, sizeof(__pyx_k_new_parser), 0, 0, 1, 1},
35133   {&__pyx_kp_u_no_such_child, __pyx_k_no_such_child, sizeof(__pyx_k_no_such_child), 0, 1, 0, 0},
35134   {&__pyx_n_u_nonNegativeInteger, __pyx_k_nonNegativeInteger, sizeof(__pyx_k_nonNegativeInteger), 0, 1, 0, 1},
35135   {&__pyx_n_u_nonPositiveInteger, __pyx_k_nonPositiveInteger, sizeof(__pyx_k_nonPositiveInteger), 0, 1, 0, 1},
35136   {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
35137   {&__pyx_n_u_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 1, 0, 1},
35138   {&__pyx_n_u_normalizedString, __pyx_k_normalizedString, sizeof(__pyx_k_normalizedString), 0, 1, 0, 1},
35139   {&__pyx_n_s_ns, __pyx_k_ns, sizeof(__pyx_k_ns), 0, 0, 1, 1},
35140   {&__pyx_n_s_nsmap, __pyx_k_nsmap, sizeof(__pyx_k_nsmap), 0, 0, 1, 1},
35141   {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
35142   {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
35143   {&__pyx_kp_u_objects_is_not_writable, __pyx_k_objects_is_not_writable, sizeof(__pyx_k_objects_is_not_writable), 0, 1, 0, 0},
35144   {&__pyx_n_s_oct, __pyx_k_oct, sizeof(__pyx_k_oct), 0, 0, 1, 1},
35145   {&__pyx_kp_u_of, __pyx_k_of, sizeof(__pyx_k_of), 0, 1, 0, 0},
35146   {&__pyx_n_s_on, __pyx_k_on, sizeof(__pyx_k_on), 0, 0, 1, 1},
35147   {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1},
35148   {&__pyx_n_u_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 1, 0, 1},
35149   {&__pyx_n_s_parseBool, __pyx_k_parseBool, sizeof(__pyx_k_parseBool), 0, 0, 1, 1},
35150   {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
35151   {&__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},
35152   {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
35153   {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
35154   {&__pyx_n_s_pickleReduceElementTree, __pyx_k_pickleReduceElementTree, sizeof(__pyx_k_pickleReduceElementTree), 0, 0, 1, 1},
35155   {&__pyx_n_u_positiveInteger, __pyx_k_positiveInteger, sizeof(__pyx_k_positiveInteger), 0, 1, 0, 1},
35156   {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
35157   {&__pyx_kp_u_py, __pyx_k_py, sizeof(__pyx_k_py), 0, 1, 0, 0},
35158   {&__pyx_n_s_py_2, __pyx_k_py_2, sizeof(__pyx_k_py_2), 0, 0, 1, 1},
35159   {&__pyx_n_s_py_type, __pyx_k_py_type, sizeof(__pyx_k_py_type), 0, 0, 1, 1},
35160   {&__pyx_n_s_pyannotate, __pyx_k_pyannotate, sizeof(__pyx_k_pyannotate), 0, 0, 1, 1},
35161   {&__pyx_n_u_pyannotate, __pyx_k_pyannotate, sizeof(__pyx_k_pyannotate), 0, 1, 0, 1},
35162   {&__pyx_n_s_pytype, __pyx_k_pytype, sizeof(__pyx_k_pytype), 0, 0, 1, 1},
35163   {&__pyx_n_u_pytype, __pyx_k_pytype, sizeof(__pyx_k_pytype), 0, 1, 0, 1},
35164   {&__pyx_n_s_pytype_2, __pyx_k_pytype_2, sizeof(__pyx_k_pytype_2), 0, 0, 1, 1},
35165   {&__pyx_n_s_pytypename, __pyx_k_pytypename, sizeof(__pyx_k_pytypename), 0, 0, 1, 1},
35166   {&__pyx_n_u_pytypename, __pyx_k_pytypename, sizeof(__pyx_k_pytypename), 0, 1, 0, 1},
35167   {&__pyx_n_s_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 0, 0, 1, 1},
35168   {&__pyx_n_u_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 0, 1, 0, 1},
35169   {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
35170   {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
35171   {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
35172   {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
35173   {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
35174   {&__pyx_n_s_remove_blank_text, __pyx_k_remove_blank_text, sizeof(__pyx_k_remove_blank_text), 0, 0, 1, 1},
35175   {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
35176   {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
35177   {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
35178   {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1},
35179   {&__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},
35180   {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
35181   {&__pyx_kp_u_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 1, 0, 0},
35182   {&__pyx_n_s_s_3, __pyx_k_s_3, sizeof(__pyx_k_s_3), 0, 0, 1, 1},
35183   {&__pyx_kp_u_s_nil, __pyx_k_s_nil, sizeof(__pyx_k_s_nil), 0, 1, 0, 0},
35184   {&__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},
35185   {&__pyx_kp_u_s_type, __pyx_k_s_type, sizeof(__pyx_k_s_type), 0, 1, 0, 0},
35186   {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
35187   {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
35188   {&__pyx_n_s_setText, __pyx_k_setText, sizeof(__pyx_k_setText), 0, 0, 1, 1},
35189   {&__pyx_n_s_setValueParser, __pyx_k_setValueParser, sizeof(__pyx_k_setValueParser), 0, 0, 1, 1},
35190   {&__pyx_n_s_set_default_parser, __pyx_k_set_default_parser, sizeof(__pyx_k_set_default_parser), 0, 0, 1, 1},
35191   {&__pyx_n_u_set_default_parser, __pyx_k_set_default_parser, sizeof(__pyx_k_set_default_parser), 0, 1, 0, 1},
35192   {&__pyx_n_s_set_element_class_lookup, __pyx_k_set_element_class_lookup, sizeof(__pyx_k_set_element_class_lookup), 0, 0, 1, 1},
35193   {&__pyx_n_s_set_pytype_attribute_tag, __pyx_k_set_pytype_attribute_tag, sizeof(__pyx_k_set_pytype_attribute_tag), 0, 0, 1, 1},
35194   {&__pyx_n_u_set_pytype_attribute_tag, __pyx_k_set_pytype_attribute_tag, sizeof(__pyx_k_set_pytype_attribute_tag), 0, 1, 0, 1},
35195   {&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1},
35196   {&__pyx_n_u_short, __pyx_k_short, sizeof(__pyx_k_short), 0, 1, 0, 1},
35197   {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
35198   {&__pyx_kp_s_src_lxml_objectify_pyx, __pyx_k_src_lxml_objectify_pyx, sizeof(__pyx_k_src_lxml_objectify_pyx), 0, 0, 1, 0},
35199   {&__pyx_kp_s_src_lxml_objectpath_pxi, __pyx_k_src_lxml_objectpath_pxi, sizeof(__pyx_k_src_lxml_objectpath_pxi), 0, 0, 1, 0},
35200   {&__pyx_n_u_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 1, 0, 1},
35201   {&__pyx_n_u_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 1, 0, 1},
35202   {&__pyx_n_s_stringify, __pyx_k_stringify, sizeof(__pyx_k_stringify), 0, 0, 1, 1},
35203   {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
35204   {&__pyx_n_s_strip_attributes, __pyx_k_strip_attributes, sizeof(__pyx_k_strip_attributes), 0, 0, 1, 1},
35205   {&__pyx_n_s_strlen, __pyx_k_strlen, sizeof(__pyx_k_strlen), 0, 0, 1, 1},
35206   {&__pyx_n_s_strval, __pyx_k_strval, sizeof(__pyx_k_strval), 0, 0, 1, 1},
35207   {&__pyx_n_s_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 0, 1, 1},
35208   {&__pyx_n_u_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 1, 0, 1},
35209   {&__pyx_n_s_tag_2, __pyx_k_tag_2, sizeof(__pyx_k_tag_2), 0, 0, 1, 1},
35210   {&__pyx_n_u_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 0, 1, 0, 1},
35211   {&__pyx_n_s_temp, __pyx_k_temp, sizeof(__pyx_k_temp), 0, 0, 1, 1},
35212   {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
35213   {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
35214   {&__pyx_n_u_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 1, 0, 1},
35215   {&__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},
35216   {&__pyx_n_u_token, __pyx_k_token, sizeof(__pyx_k_token), 0, 1, 0, 1},
35217   {&__pyx_n_s_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 0, 0, 1, 1},
35218   {&__pyx_n_s_tree_class, __pyx_k_tree_class, sizeof(__pyx_k_tree_class), 0, 0, 1, 1},
35219   {&__pyx_n_s_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 0, 1, 1},
35220   {&__pyx_n_u_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 1, 0, 1},
35221   {&__pyx_n_s_type_check, __pyx_k_type_check, sizeof(__pyx_k_type_check), 0, 0, 1, 1},
35222   {&__pyx_n_s_type_class, __pyx_k_type_class, sizeof(__pyx_k_type_class), 0, 0, 1, 1},
35223   {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
35224   {&__pyx_kp_s_unicode_escape, __pyx_k_unicode_escape, sizeof(__pyx_k_unicode_escape), 0, 0, 1, 0},
35225   {&__pyx_n_s_unpickleElementTree, __pyx_k_unpickleElementTree, sizeof(__pyx_k_unpickleElementTree), 0, 0, 1, 1},
35226   {&__pyx_n_s_unregister, __pyx_k_unregister, sizeof(__pyx_k_unregister), 0, 0, 1, 1},
35227   {&__pyx_n_u_unsignedByte, __pyx_k_unsignedByte, sizeof(__pyx_k_unsignedByte), 0, 1, 0, 1},
35228   {&__pyx_n_u_unsignedInt, __pyx_k_unsignedInt, sizeof(__pyx_k_unsignedInt), 0, 1, 0, 1},
35229   {&__pyx_n_u_unsignedLong, __pyx_k_unsignedLong, sizeof(__pyx_k_unsignedLong), 0, 1, 0, 1},
35230   {&__pyx_n_u_unsignedShort, __pyx_k_unsignedShort, sizeof(__pyx_k_unsignedShort), 0, 1, 0, 1},
35231   {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
35232   {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
35233   {&__pyx_n_u_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 1, 0, 1},
35234   {&__pyx_n_s_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 0, 1, 1},
35235   {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
35236   {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
35237   {&__pyx_n_s_xml, __pyx_k_xml, sizeof(__pyx_k_xml), 0, 0, 1, 1},
35238   {&__pyx_n_s_xmlSchemaTypes, __pyx_k_xmlSchemaTypes, sizeof(__pyx_k_xmlSchemaTypes), 0, 0, 1, 1},
35239   {&__pyx_n_s_xs_type, __pyx_k_xs_type, sizeof(__pyx_k_xs_type), 0, 0, 1, 1},
35240   {&__pyx_kp_u_xsd, __pyx_k_xsd, sizeof(__pyx_k_xsd), 0, 1, 0, 0},
35241   {&__pyx_n_s_xsd_2, __pyx_k_xsd_2, sizeof(__pyx_k_xsd_2), 0, 0, 1, 1},
35242   {&__pyx_kp_u_xsi, __pyx_k_xsi, sizeof(__pyx_k_xsi), 0, 1, 0, 0},
35243   {&__pyx_n_s_xsi_2, __pyx_k_xsi_2, sizeof(__pyx_k_xsi_2), 0, 0, 1, 1},
35244   {&__pyx_n_s_xsi_3, __pyx_k_xsi_3, sizeof(__pyx_k_xsi_3), 0, 0, 1, 1},
35245   {&__pyx_n_s_xsi_nil, __pyx_k_xsi_nil, sizeof(__pyx_k_xsi_nil), 0, 0, 1, 1},
35246   {&__pyx_n_s_xsiannotate, __pyx_k_xsiannotate, sizeof(__pyx_k_xsiannotate), 0, 0, 1, 1},
35247   {&__pyx_n_u_xsiannotate, __pyx_k_xsiannotate, sizeof(__pyx_k_xsiannotate), 0, 1, 0, 1},
35248   {0, 0, 0, 0, 0, 0, 0}
35249 };
35250 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
35251   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 44, __pyx_L1_error)
35252   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 44, __pyx_L1_error)
35253   __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(1, 10, __pyx_L1_error)
35254   __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 299, __pyx_L1_error)
35255   __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 450, __pyx_L1_error)
35256   __pyx_builtin_oct = __Pyx_GetBuiltinName(__pyx_n_s_oct); if (!__pyx_builtin_oct) __PYX_ERR(0, 644, __pyx_L1_error)
35257   __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 647, __pyx_L1_error)
35258   __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 973, __pyx_L1_error)
35259   __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 1011, __pyx_L1_error)
35260   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 169, __pyx_L1_error)
35261   return 0;
35262   __pyx_L1_error:;
35263   return -1;
35264 }
35265
35266 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
35267   __Pyx_RefNannyDeclarations
35268   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
35269
35270   /* "lxml/objectify.pyx":467
35271  *         new_element.tag = element.tag
35272  *     elif isinstance(value, (list, tuple)):
35273  *         element[:] = value             # <<<<<<<<<<<<<<
35274  *         return
35275  *     else:
35276  */
35277   __pyx_slice__3 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 467, __pyx_L1_error)
35278   __Pyx_GOTREF(__pyx_slice__3);
35279   __Pyx_GIVEREF(__pyx_slice__3);
35280
35281   /* "lxml/objectify.pyx":1033
35282  * cdef _registerPyTypes():
35283  *     pytype = PyType(u'int', int, IntElement)
35284  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",             # <<<<<<<<<<<<<<
35285  *                              u"unsignedByte", u"nonPositiveInteger",
35286  *                              u"negativeInteger", u"long", u"nonNegativeInteger",
35287  */
35288   __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)
35289   __Pyx_GOTREF(__pyx_tuple__5);
35290   __Pyx_GIVEREF(__pyx_tuple__5);
35291
35292   /* "lxml/objectify.pyx":1044
35293  * 
35294  *     pytype = PyType(u'float', float, FloatElement, repr)
35295  *     pytype.xmlSchemaTypes = (u"double", u"float")             # <<<<<<<<<<<<<<
35296  *     pytype.register()
35297  * 
35298  */
35299   __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)
35300   __Pyx_GOTREF(__pyx_tuple__6);
35301   __Pyx_GIVEREF(__pyx_tuple__6);
35302
35303   /* "lxml/objectify.pyx":1048
35304  * 
35305  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
35306  *     pytype.xmlSchemaTypes = (u"boolean",)             # <<<<<<<<<<<<<<
35307  *     pytype.register()
35308  * 
35309  */
35310   __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_u_boolean); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1048, __pyx_L1_error)
35311   __Pyx_GOTREF(__pyx_tuple__7);
35312   __Pyx_GIVEREF(__pyx_tuple__7);
35313
35314   /* "lxml/objectify.pyx":1052
35315  * 
35316  *     pytype = PyType(u'str', None, StringElement)
35317  *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",             # <<<<<<<<<<<<<<
35318  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
35319  *                              u"NMTOKEN", )
35320  */
35321   __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)
35322   __Pyx_GOTREF(__pyx_tuple__8);
35323   __Pyx_GIVEREF(__pyx_tuple__8);
35324
35325   /* "lxml/objectify.pyx":1349
35326  *         result += _dump(child, indent)
35327  *     if indent == 1:
35328  *         return result[:-1] # strip last '\n'             # <<<<<<<<<<<<<<
35329  *     else:
35330  *         return result
35331  */
35332   __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)
35333   __Pyx_GOTREF(__pyx_slice__16);
35334   __Pyx_GIVEREF(__pyx_slice__16);
35335
35336   /* "lxml/objectify.pyx":1430
35337  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
35338  *         if schema_type is None and u':' in value:
35339  *             prefix, value = value.split(u':', 1)             # <<<<<<<<<<<<<<
35340  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
35341  *         if schema_type is not None:
35342  */
35343   __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)
35344   __Pyx_GOTREF(__pyx_tuple__18);
35345   __Pyx_GIVEREF(__pyx_tuple__18);
35346
35347   /* "lxml/objectify.pyx":44
35348  * import re
35349  * 
35350  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)             # <<<<<<<<<<<<<<
35351  * cdef object is_special_method = re.compile(u'__.*__$').match
35352  * 
35353  */
35354   __pyx_tuple__22 = PyTuple_Pack(2, __pyx_builtin_ValueError, __pyx_builtin_TypeError); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 44, __pyx_L1_error)
35355   __Pyx_GOTREF(__pyx_tuple__22);
35356   __Pyx_GIVEREF(__pyx_tuple__22);
35357
35358   /* "lxml/objectify.pyx":45
35359  * 
35360  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
35361  * cdef object is_special_method = re.compile(u'__.*__$').match             # <<<<<<<<<<<<<<
35362  * 
35363  * 
35364  */
35365   __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u__23); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 45, __pyx_L1_error)
35366   __Pyx_GOTREF(__pyx_tuple__24);
35367   __Pyx_GIVEREF(__pyx_tuple__24);
35368
35369   /* "lxml/objectify.pyx":82
35370  *     return s, python.PyUnicode_AsUTF8String(s)
35371  * 
35372  * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
35373  *     u"""set_pytype_attribute_tag(attribute_tag=None)
35374  *     Change name and namespace of the XML attribute that holds Python type
35375  */
35376   __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_attribute_tag); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 82, __pyx_L1_error)
35377   __Pyx_GOTREF(__pyx_tuple__25);
35378   __Pyx_GIVEREF(__pyx_tuple__25);
35379   __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)
35380   __pyx_tuple__27 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 82, __pyx_L1_error)
35381   __Pyx_GOTREF(__pyx_tuple__27);
35382   __Pyx_GIVEREF(__pyx_tuple__27);
35383
35384   /* "lxml/objectify.pyx":162
35385  * 
35386  *     # pickle support for objectified Element
35387  *     def __reduce__(self):             # <<<<<<<<<<<<<<
35388  *         return fromstring, (etree.tostring(self),)
35389  * 
35390  */
35391   __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 162, __pyx_L1_error)
35392   __Pyx_GOTREF(__pyx_tuple__28);
35393   __Pyx_GIVEREF(__pyx_tuple__28);
35394   __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)
35395
35396   /* "lxml/objectify.pyx":193
35397  *         return _countSiblings(self._c_node)
35398  * 
35399  *     def countchildren(self):             # <<<<<<<<<<<<<<
35400  *         u"""countchildren(self)
35401  * 
35402  */
35403   __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)
35404   __Pyx_GOTREF(__pyx_tuple__30);
35405   __Pyx_GIVEREF(__pyx_tuple__30);
35406   __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)
35407
35408   /* "lxml/objectify.pyx":210
35409  *         return c
35410  * 
35411  *     def getchildren(self):             # <<<<<<<<<<<<<<
35412  *         u"""getchildren(self)
35413  * 
35414  */
35415   __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)
35416   __Pyx_GOTREF(__pyx_tuple__32);
35417   __Pyx_GIVEREF(__pyx_tuple__32);
35418   __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)
35419
35420   /* "lxml/objectify.pyx":263
35421  *         self.remove(child)
35422  * 
35423  *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
35424  *         u"""addattr(self, tag, value)
35425  * 
35426  */
35427   __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)
35428   __Pyx_GOTREF(__pyx_tuple__34);
35429   __Pyx_GIVEREF(__pyx_tuple__34);
35430   __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)
35431
35432   /* "lxml/objectify.pyx":369
35433  *             parent.remove(sibling)
35434  * 
35435  *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
35436  *         u"""descendantpaths(self, prefix=None)
35437  * 
35438  */
35439   __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)
35440   __Pyx_GOTREF(__pyx_tuple__36);
35441   __Pyx_GIVEREF(__pyx_tuple__36);
35442   __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)
35443
35444   /* "lxml/objectify.pyx":606
35445  *         return strrepr(textOf(self._c_node) or '')
35446  * 
35447  *     def _setText(self, s):             # <<<<<<<<<<<<<<
35448  *         u"""For use in subclasses only. Don't use unless you know what you are
35449  *         doing.
35450  */
35451   __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)
35452   __Pyx_GOTREF(__pyx_tuple__38);
35453   __Pyx_GIVEREF(__pyx_tuple__38);
35454   __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)
35455
35456   /* "lxml/objectify.pyx":614
35457  * cdef class NumberElement(ObjectifiedDataElement):
35458  *     cdef object _parse_value
35459  *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
35460  *         u"""Set the function that parses the Python value from a string.
35461  * 
35462  */
35463   __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)
35464   __Pyx_GOTREF(__pyx_tuple__40);
35465   __Pyx_GIVEREF(__pyx_tuple__40);
35466   __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)
35467
35468   /* "lxml/objectify.pyx":634
35469  *         return float(_parseNumber(self))
35470  * 
35471  *     def __complex__(self):             # <<<<<<<<<<<<<<
35472  *         return complex(_parseNumber(self))
35473  * 
35474  */
35475   __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 634, __pyx_L1_error)
35476   __Pyx_GOTREF(__pyx_tuple__42);
35477   __Pyx_GIVEREF(__pyx_tuple__42);
35478   __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)
35479
35480   /* "lxml/objectify.pyx":710
35481  * 
35482  * cdef class IntElement(NumberElement):
35483  *     def _init(self):             # <<<<<<<<<<<<<<
35484  *         self._parse_value = int
35485  * 
35486  */
35487   __pyx_tuple__44 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 710, __pyx_L1_error)
35488   __Pyx_GOTREF(__pyx_tuple__44);
35489   __Pyx_GIVEREF(__pyx_tuple__44);
35490   __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)
35491
35492   /* "lxml/objectify.pyx":717
35493  * 
35494  * cdef class LongElement(NumberElement):
35495  *     def _init(self):             # <<<<<<<<<<<<<<
35496  *         self._parse_value = long
35497  * 
35498  */
35499   __pyx_tuple__46 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 717, __pyx_L1_error)
35500   __Pyx_GOTREF(__pyx_tuple__46);
35501   __Pyx_GIVEREF(__pyx_tuple__46);
35502   __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)
35503
35504   /* "lxml/objectify.pyx":724
35505  * 
35506  * cdef class FloatElement(NumberElement):
35507  *     def _init(self):             # <<<<<<<<<<<<<<
35508  *         self._parse_value = float
35509  * 
35510  */
35511   __pyx_tuple__48 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 724, __pyx_L1_error)
35512   __Pyx_GOTREF(__pyx_tuple__48);
35513   __Pyx_GIVEREF(__pyx_tuple__48);
35514   __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)
35515
35516   /* "lxml/objectify.pyx":741
35517  *         return repr(textOf(self._c_node) or u'')
35518  * 
35519  *     def strlen(self):             # <<<<<<<<<<<<<<
35520  *         text = textOf(self._c_node)
35521  *         if text is None:
35522  */
35523   __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)
35524   __Pyx_GOTREF(__pyx_tuple__50);
35525   __Pyx_GIVEREF(__pyx_tuple__50);
35526   __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)
35527
35528   /* "lxml/objectify.pyx":786
35529  *         return float(textOf(self._c_node))
35530  * 
35531  *     def __complex__(self):             # <<<<<<<<<<<<<<
35532  *         return complex(textOf(self._c_node))
35533  * 
35534  */
35535   __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 786, __pyx_L1_error)
35536   __Pyx_GOTREF(__pyx_tuple__52);
35537   __Pyx_GIVEREF(__pyx_tuple__52);
35538   __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)
35539
35540   /* "lxml/objectify.pyx":821
35541  *     Python's bool type.
35542  *     """
35543  *     def _init(self):             # <<<<<<<<<<<<<<
35544  *         self._parse_value = __parseBool
35545  * 
35546  */
35547   __pyx_tuple__54 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 821, __pyx_L1_error)
35548   __Pyx_GOTREF(__pyx_tuple__54);
35549   __Pyx_GIVEREF(__pyx_tuple__54);
35550   __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)
35551
35552   /* "lxml/objectify.pyx":843
35553  *         return __parseBool(textOf(self._c_node))
35554  * 
35555  * def __checkBool(s):             # <<<<<<<<<<<<<<
35556  *     cdef int value = -1
35557  *     if s is not None:
35558  */
35559   __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)
35560   __Pyx_GOTREF(__pyx_tuple__56);
35561   __Pyx_GIVEREF(__pyx_tuple__56);
35562   __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)
35563
35564   /* "lxml/objectify.pyx":850
35565  *         raise ValueError
35566  * 
35567  * cpdef bint __parseBool(s) except -1:             # <<<<<<<<<<<<<<
35568  *     cdef int value
35569  *     if s is None:
35570  */
35571   __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_s_3); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 850, __pyx_L1_error)
35572   __Pyx_GOTREF(__pyx_tuple__58);
35573   __Pyx_GIVEREF(__pyx_tuple__58);
35574   __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)
35575
35576   /* "lxml/objectify.pyx":948
35577  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
35578  * 
35579  *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
35580  *         u"""register(self, before=None, after=None)
35581  * 
35582  */
35583   __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)
35584   __Pyx_GOTREF(__pyx_tuple__60);
35585   __Pyx_GIVEREF(__pyx_tuple__60);
35586   __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)
35587
35588   /* "lxml/objectify.pyx":989
35589  *             _SCHEMA_TYPE_DICT[xs_type] = self
35590  * 
35591  *     def unregister(self):             # <<<<<<<<<<<<<<
35592  *         u"unregister(self)"
35593  *         if _PYTYPE_DICT.get(self.name) is self:
35594  */
35595   __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)
35596   __Pyx_GOTREF(__pyx_tuple__62);
35597   __Pyx_GIVEREF(__pyx_tuple__62);
35598   __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)
35599
35600   /* "lxml/objectify.pyx":1018
35601  * cdef list _TYPE_CHECKS = []
35602  * 
35603  * def __lower_bool(b):             # <<<<<<<<<<<<<<
35604  *     return u"true" if b else u"false"
35605  * 
35606  */
35607   __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_b); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1018, __pyx_L1_error)
35608   __Pyx_GOTREF(__pyx_tuple__64);
35609   __Pyx_GIVEREF(__pyx_tuple__64);
35610   __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)
35611
35612   /* "lxml/objectify.pyx":1024
35613  *     return u"str" if python._isString(obj) else _typename(obj)
35614  * 
35615  * def pytypename(obj):             # <<<<<<<<<<<<<<
35616  *     u"""pytypename(obj)
35617  * 
35618  */
35619   __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1024, __pyx_L1_error)
35620   __Pyx_GOTREF(__pyx_tuple__66);
35621   __Pyx_GIVEREF(__pyx_tuple__66);
35622   __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)
35623
35624   /* "lxml/objectify.pyx":1070
35625  * _registerPyTypes()
35626  * 
35627  * def getRegisteredTypes():             # <<<<<<<<<<<<<<
35628  *     u"""getRegisteredTypes()
35629  * 
35630  */
35631   __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)
35632   __Pyx_GOTREF(__pyx_tuple__68);
35633   __Pyx_GIVEREF(__pyx_tuple__68);
35634   __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)
35635
35636   /* "lxml/objectify.pyx":1305
35637  * cdef bint __RECURSIVE_STR = 0 # default: off
35638  * 
35639  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
35640  *     u"""enable_recursive_str(on=True)
35641  * 
35642  */
35643   __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_on); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1305, __pyx_L1_error)
35644   __Pyx_GOTREF(__pyx_tuple__70);
35645   __Pyx_GIVEREF(__pyx_tuple__70);
35646   __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)
35647   __pyx_tuple__72 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1305, __pyx_L1_error)
35648   __Pyx_GOTREF(__pyx_tuple__72);
35649   __Pyx_GIVEREF(__pyx_tuple__72);
35650
35651   /* "lxml/objectify.pyx":1314
35652  *     __RECURSIVE_STR = on
35653  * 
35654  * def dump(_Element element not None):             # <<<<<<<<<<<<<<
35655  *     u"""dump(_Element element not None)
35656  * 
35657  */
35658   __pyx_tuple__73 = PyTuple_Pack(1, __pyx_n_s_element); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1314, __pyx_L1_error)
35659   __Pyx_GOTREF(__pyx_tuple__73);
35660   __Pyx_GIVEREF(__pyx_tuple__73);
35661   __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)
35662
35663   /* "lxml/objectify.pyx":1357
35664  * # Pickle support for objectified ElementTree
35665  * 
35666  * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
35667  *     return etree.ElementTree(fromstring(data))
35668  * 
35669  */
35670   __pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1357, __pyx_L1_error)
35671   __Pyx_GOTREF(__pyx_tuple__75);
35672   __Pyx_GIVEREF(__pyx_tuple__75);
35673   __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)
35674
35675   /* "lxml/objectify.pyx":1368
35676  *                    elementTreeReduceFunction, __unpickleElementTree)
35677  * 
35678  * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
35679  *     return __unpickleElementTree, (etree.tostring(obj),)
35680  * 
35681  */
35682   __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1368, __pyx_L1_error)
35683   __Pyx_GOTREF(__pyx_tuple__77);
35684   __Pyx_GIVEREF(__pyx_tuple__77);
35685   __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)
35686
35687   /* "lxml/objectify.pyx":1462
35688  *     return None
35689  * 
35690  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
35691  *              empty_pytype=None):
35692  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
35693  */
35694   __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)
35695   __Pyx_GOTREF(__pyx_tuple__79);
35696   __Pyx_GIVEREF(__pyx_tuple__79);
35697   __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)
35698
35699   /* "lxml/objectify.pyx":1485
35700  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
35701  * 
35702  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
35703  *                 empty_type=None):
35704  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
35705  */
35706   __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)
35707   __Pyx_GOTREF(__pyx_tuple__81);
35708   __Pyx_GIVEREF(__pyx_tuple__81);
35709   __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)
35710
35711   /* "lxml/objectify.pyx":1513
35712  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
35713  * 
35714  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
35715  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
35716  *              annotate_pytype=1):
35717  */
35718   __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)
35719   __Pyx_GOTREF(__pyx_tuple__83);
35720   __Pyx_GIVEREF(__pyx_tuple__83);
35721   __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)
35722
35723   /* "lxml/objectify.pyx":1709
35724  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
35725  * 
35726  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
35727  *                bint xsi_nil=False, bint cleanup_namespaces=False):
35728  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
35729  */
35730   __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)
35731   __Pyx_GOTREF(__pyx_tuple__85);
35732   __Pyx_GIVEREF(__pyx_tuple__85);
35733   __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)
35734
35735   /* "lxml/objectify.pyx":1749
35736  * objectify_parser = __DEFAULT_PARSER
35737  * 
35738  * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
35739  *     u"""set_default_parser(new_parser = None)
35740  * 
35741  */
35742   __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_new_parser); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1749, __pyx_L1_error)
35743   __Pyx_GOTREF(__pyx_tuple__87);
35744   __Pyx_GIVEREF(__pyx_tuple__87);
35745   __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)
35746   __pyx_tuple__89 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 1749, __pyx_L1_error)
35747   __Pyx_GOTREF(__pyx_tuple__89);
35748   __Pyx_GIVEREF(__pyx_tuple__89);
35749
35750   /* "lxml/objectify.pyx":1767
35751  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
35752  * 
35753  * def makeparser(**kw):             # <<<<<<<<<<<<<<
35754  *     u"""makeparser(remove_blank_text=True, **kw)
35755  * 
35756  */
35757   __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)
35758   __Pyx_GOTREF(__pyx_tuple__90);
35759   __Pyx_GIVEREF(__pyx_tuple__90);
35760   __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)
35761
35762   /* "lxml/objectify.pyx":1794
35763  * SubElement = etree.SubElement
35764  * 
35765  * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
35766  *     u"""fromstring(xml, parser=None, base_url=None)
35767  * 
35768  */
35769   __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)
35770   __Pyx_GOTREF(__pyx_tuple__92);
35771   __Pyx_GIVEREF(__pyx_tuple__92);
35772   __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)
35773   __pyx_tuple__94 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1794, __pyx_L1_error)
35774   __Pyx_GOTREF(__pyx_tuple__94);
35775   __Pyx_GIVEREF(__pyx_tuple__94);
35776
35777   /* "lxml/objectify.pyx":1810
35778  *     return _fromstring(xml, parser, base_url=base_url)
35779  * 
35780  * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
35781  *     u"""XML(xml, parser=None, base_url=None)
35782  * 
35783  */
35784   __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)
35785   __Pyx_GOTREF(__pyx_tuple__95);
35786   __Pyx_GIVEREF(__pyx_tuple__95);
35787   __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)
35788   __pyx_tuple__97 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 1810, __pyx_L1_error)
35789   __Pyx_GOTREF(__pyx_tuple__97);
35790   __Pyx_GIVEREF(__pyx_tuple__97);
35791
35792   /* "lxml/objectify.pyx":1829
35793  * _parse = etree.parse
35794  * 
35795  * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
35796  *     u"""parse(f, parser=None, base_url=None)
35797  * 
35798  */
35799   __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)
35800   __Pyx_GOTREF(__pyx_tuple__98);
35801   __Pyx_GIVEREF(__pyx_tuple__98);
35802   __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)
35803   __pyx_tuple__100 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1829, __pyx_L1_error)
35804   __Pyx_GOTREF(__pyx_tuple__100);
35805   __Pyx_GIVEREF(__pyx_tuple__100);
35806
35807   /* "lxml/objectify.pyx":1852
35808  * E = ElementMaker()
35809  * 
35810  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
35811  *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
35812  * 
35813  */
35814   __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)
35815   __Pyx_GOTREF(__pyx_tuple__101);
35816   __Pyx_GIVEREF(__pyx_tuple__101);
35817   __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)
35818   __pyx_tuple__103 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 1852, __pyx_L1_error)
35819   __Pyx_GOTREF(__pyx_tuple__103);
35820   __Pyx_GIVEREF(__pyx_tuple__103);
35821
35822   /* "lxml/objectify.pyx":1872
35823  *     return _makeElement(_tag, None, _attributes, nsmap)
35824  * 
35825  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
35826  *                 **_attributes):
35827  *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
35828  */
35829   __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)
35830   __Pyx_GOTREF(__pyx_tuple__104);
35831   __Pyx_GIVEREF(__pyx_tuple__104);
35832   __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)
35833   __pyx_tuple__106 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 1872, __pyx_L1_error)
35834   __Pyx_GOTREF(__pyx_tuple__106);
35835   __Pyx_GIVEREF(__pyx_tuple__106);
35836
35837   /* "src/lxml/objectpath.pxi":57
35838  *         return _find_object_path(root, self._c_path, self._path_len, default)
35839  * 
35840  *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
35841  *         u"hasattr(self, root)"
35842  *         try:
35843  */
35844   __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)
35845   __Pyx_GOTREF(__pyx_tuple__107);
35846   __Pyx_GIVEREF(__pyx_tuple__107);
35847   __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)
35848
35849   /* "src/lxml/objectpath.pxi":65
35850  *         return True
35851  * 
35852  *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
35853  *         u"""setattr(self, root, value)
35854  * 
35855  */
35856   __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)
35857   __Pyx_GOTREF(__pyx_tuple__109);
35858   __Pyx_GIVEREF(__pyx_tuple__109);
35859   __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)
35860
35861   /* "src/lxml/objectpath.pxi":74
35862  *         _create_object_path(root, self._c_path, self._path_len, 1, value)
35863  * 
35864  *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
35865  *         u"""addattr(self, root, value)
35866  * 
35867  */
35868   __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)
35869   __Pyx_GOTREF(__pyx_tuple__111);
35870   __Pyx_GIVEREF(__pyx_tuple__111);
35871   __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)
35872
35873   /* "src/lxml/objectpath.pxi":88
35874  *     re.U).match
35875  * 
35876  * cdef tuple _RELATIVE_PATH_SEGMENT = (None, None, 0)             # <<<<<<<<<<<<<<
35877  * 
35878  * 
35879  */
35880   __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)
35881   __Pyx_GOTREF(__pyx_tuple__113);
35882   __Pyx_GIVEREF(__pyx_tuple__113);
35883   __Pyx_RefNannyFinishContext();
35884   return 0;
35885   __pyx_L1_error:;
35886   __Pyx_RefNannyFinishContext();
35887   return -1;
35888 }
35889
35890 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
35891   __pyx_umethod_PyBytes_Type_split.type = (PyObject*)&PyBytes_Type;
35892   __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
35893   __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
35894   __pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
35895   __pyx_umethod_PyList_Type_remove.type = (PyObject*)&PyList_Type;
35896   __pyx_umethod_PyUnicode_Type_strip.type = (PyObject*)&PyUnicode_Type;
35897   if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
35898   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
35899   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
35900   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
35901   return 0;
35902   __pyx_L1_error:;
35903   return -1;
35904 }
35905
35906 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
35907 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
35908 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
35909 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
35910 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
35911 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
35912 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
35913
35914 static int __Pyx_modinit_global_init_code(void) {
35915   __Pyx_RefNannyDeclarations
35916   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
35917   /*--- Global init code ---*/
35918   __pyx_v_4lxml_9objectify_etree = Py_None; Py_INCREF(Py_None);
35919   __pyx_v_4lxml_9objectify_re = Py_None; Py_INCREF(Py_None);
35920   __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = ((PyObject*)Py_None); Py_INCREF(Py_None);
35921   __pyx_v_4lxml_9objectify_is_special_method = Py_None; Py_INCREF(Py_None);
35922   __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = Py_None; Py_INCREF(Py_None);
35923   __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = ((PyObject*)Py_None); Py_INCREF(Py_None);
35924   __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = Py_None; Py_INCREF(Py_None);
35925   __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = ((PyObject*)Py_None); Py_INCREF(Py_None);
35926   __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = ((PyObject*)Py_None); Py_INCREF(Py_None);
35927   __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = Py_None; Py_INCREF(Py_None);
35928   __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = Py_None; Py_INCREF(Py_None);
35929   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = Py_None; Py_INCREF(Py_None);
35930   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = Py_None; Py_INCREF(Py_None);
35931   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = Py_None; Py_INCREF(Py_None);
35932   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = Py_None; Py_INCREF(Py_None);
35933   __pyx_v_4lxml_9objectify__PYTYPE_DICT = ((PyObject*)Py_None); Py_INCREF(Py_None);
35934   __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = ((PyObject*)Py_None); Py_INCREF(Py_None);
35935   __pyx_v_4lxml_9objectify__TYPE_CHECKS = ((PyObject*)Py_None); Py_INCREF(Py_None);
35936   __pyx_v_4lxml_9objectify_TREE_PYTYPE = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
35937   __pyx_v_4lxml_9objectify__strip_attributes = Py_None; Py_INCREF(Py_None);
35938   __pyx_v_4lxml_9objectify__cleanup_namespaces = Py_None; Py_INCREF(Py_None);
35939   __pyx_v_4lxml_9objectify___DEFAULT_PARSER = Py_None; Py_INCREF(Py_None);
35940   __pyx_v_4lxml_9objectify_objectify_parser = Py_None; Py_INCREF(Py_None);
35941   __pyx_v_4lxml_9objectify__fromstring = Py_None; Py_INCREF(Py_None);
35942   __pyx_v_4lxml_9objectify__parse = Py_None; Py_INCREF(Py_None);
35943   __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = ((PyObject*)Py_None); Py_INCREF(Py_None);
35944   __pyx_v_4lxml_9objectify__NO_DEFAULT = Py_None; Py_INCREF(Py_None);
35945   __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
35946   __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = ((PyObject*)Py_None); Py_INCREF(Py_None);
35947   __Pyx_RefNannyFinishContext();
35948   return 0;
35949 }
35950
35951 static int __Pyx_modinit_variable_export_code(void) {
35952   __Pyx_RefNannyDeclarations
35953   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
35954   /*--- Variable export code ---*/
35955   __Pyx_RefNannyFinishContext();
35956   return 0;
35957 }
35958
35959 static int __Pyx_modinit_function_export_code(void) {
35960   __Pyx_RefNannyDeclarations
35961   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
35962   /*--- Function export code ---*/
35963   __Pyx_RefNannyFinishContext();
35964   return 0;
35965 }
35966
35967 static int __Pyx_modinit_type_init_code(void) {
35968   __Pyx_RefNannyDeclarations
35969   PyObject *__pyx_t_1 = NULL;
35970   int __pyx_lineno = 0;
35971   const char *__pyx_filename = NULL;
35972   int __pyx_clineno = 0;
35973   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
35974   /*--- Type init code ---*/
35975   __pyx_t_1 = PyImport_ImportModule("lxml.etree"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
35976   __Pyx_GOTREF(__pyx_t_1);
35977   __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "ElementBase", sizeof(struct LxmlElementBase), __Pyx_ImportType_CheckSize_Warn);
35978    if (!__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase) __PYX_ERR(0, 1, __pyx_L1_error)
35979   __pyx_type_4lxml_9objectify_ObjectifiedElement.tp_base = __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase;
35980   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
35981   #if PY_VERSION_HEX < 0x030800B1
35982   __pyx_type_4lxml_9objectify_ObjectifiedElement.tp_print = 0;
35983   #endif
35984   #if CYTHON_COMPILING_IN_CPYTHON
35985   {
35986     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
35987     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
35988       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
35989       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__;
35990       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__;
35991     }
35992   }
35993   #endif
35994   #if CYTHON_COMPILING_IN_CPYTHON
35995   {
35996     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
35997     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
35998       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
35999       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_6__len__;
36000       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__;
36001     }
36002   }
36003   #endif
36004   #if CYTHON_COMPILING_IN_CPYTHON
36005   {
36006     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
36007     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36008       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36009       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_12__getattr__;
36010       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__;
36011     }
36012   }
36013   #endif
36014   #if CYTHON_COMPILING_IN_CPYTHON
36015   {
36016     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__setattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
36017     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36018       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36019       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_14__setattr__;
36020       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__;
36021     }
36022   }
36023   #endif
36024   #if CYTHON_COMPILING_IN_CPYTHON
36025   {
36026     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
36027     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36028       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36029       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_20__getitem__;
36030       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__;
36031     }
36032   }
36033   #endif
36034   #if CYTHON_COMPILING_IN_CPYTHON
36035   {
36036     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
36037     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36038       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36039       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_22__setitem__;
36040       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__;
36041     }
36042   }
36043   #endif
36044   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectifiedElement, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
36045   __pyx_ptype_4lxml_9objectify_ObjectifiedElement = &__pyx_type_4lxml_9objectify_ObjectifiedElement;
36046   __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedElement;
36047   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
36048   #if PY_VERSION_HEX < 0x030800B1
36049   __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_print = 0;
36050   #endif
36051   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)) {
36052     __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36053   }
36054   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectifiedDataElement, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
36055   __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = &__pyx_type_4lxml_9objectify_ObjectifiedDataElement;
36056   __pyx_type_4lxml_9objectify_NumberElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
36057   if (PyType_Ready(&__pyx_type_4lxml_9objectify_NumberElement) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
36058   #if PY_VERSION_HEX < 0x030800B1
36059   __pyx_type_4lxml_9objectify_NumberElement.tp_print = 0;
36060   #endif
36061   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)) {
36062     __pyx_type_4lxml_9objectify_NumberElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36063   }
36064   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NumberElement, (PyObject *)&__pyx_type_4lxml_9objectify_NumberElement) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
36065   __pyx_ptype_4lxml_9objectify_NumberElement = &__pyx_type_4lxml_9objectify_NumberElement;
36066   __pyx_type_4lxml_9objectify_IntElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
36067   if (PyType_Ready(&__pyx_type_4lxml_9objectify_IntElement) < 0) __PYX_ERR(0, 709, __pyx_L1_error)
36068   #if PY_VERSION_HEX < 0x030800B1
36069   __pyx_type_4lxml_9objectify_IntElement.tp_print = 0;
36070   #endif
36071   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)) {
36072     __pyx_type_4lxml_9objectify_IntElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36073   }
36074   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntElement, (PyObject *)&__pyx_type_4lxml_9objectify_IntElement) < 0) __PYX_ERR(0, 709, __pyx_L1_error)
36075   __pyx_ptype_4lxml_9objectify_IntElement = &__pyx_type_4lxml_9objectify_IntElement;
36076   __pyx_type_4lxml_9objectify_LongElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
36077   if (PyType_Ready(&__pyx_type_4lxml_9objectify_LongElement) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
36078   #if PY_VERSION_HEX < 0x030800B1
36079   __pyx_type_4lxml_9objectify_LongElement.tp_print = 0;
36080   #endif
36081   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)) {
36082     __pyx_type_4lxml_9objectify_LongElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36083   }
36084   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LongElement, (PyObject *)&__pyx_type_4lxml_9objectify_LongElement) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
36085   __pyx_ptype_4lxml_9objectify_LongElement = &__pyx_type_4lxml_9objectify_LongElement;
36086   __pyx_type_4lxml_9objectify_FloatElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
36087   if (PyType_Ready(&__pyx_type_4lxml_9objectify_FloatElement) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
36088   #if PY_VERSION_HEX < 0x030800B1
36089   __pyx_type_4lxml_9objectify_FloatElement.tp_print = 0;
36090   #endif
36091   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)) {
36092     __pyx_type_4lxml_9objectify_FloatElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36093   }
36094   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FloatElement, (PyObject *)&__pyx_type_4lxml_9objectify_FloatElement) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
36095   __pyx_ptype_4lxml_9objectify_FloatElement = &__pyx_type_4lxml_9objectify_FloatElement;
36096   __pyx_type_4lxml_9objectify_StringElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
36097   if (PyType_Ready(&__pyx_type_4lxml_9objectify_StringElement) < 0) __PYX_ERR(0, 727, __pyx_L1_error)
36098   #if PY_VERSION_HEX < 0x030800B1
36099   __pyx_type_4lxml_9objectify_StringElement.tp_print = 0;
36100   #endif
36101   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)) {
36102     __pyx_type_4lxml_9objectify_StringElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36103   }
36104   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StringElement, (PyObject *)&__pyx_type_4lxml_9objectify_StringElement) < 0) __PYX_ERR(0, 727, __pyx_L1_error)
36105   __pyx_ptype_4lxml_9objectify_StringElement = &__pyx_type_4lxml_9objectify_StringElement;
36106   __pyx_type_4lxml_9objectify_NoneElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
36107   if (PyType_Ready(&__pyx_type_4lxml_9objectify_NoneElement) < 0) __PYX_ERR(0, 789, __pyx_L1_error)
36108   #if PY_VERSION_HEX < 0x030800B1
36109   __pyx_type_4lxml_9objectify_NoneElement.tp_print = 0;
36110   #endif
36111   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)) {
36112     __pyx_type_4lxml_9objectify_NoneElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36113   }
36114   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NoneElement, (PyObject *)&__pyx_type_4lxml_9objectify_NoneElement) < 0) __PYX_ERR(0, 789, __pyx_L1_error)
36115   __pyx_ptype_4lxml_9objectify_NoneElement = &__pyx_type_4lxml_9objectify_NoneElement;
36116   __pyx_type_4lxml_9objectify_BoolElement.tp_base = __pyx_ptype_4lxml_9objectify_IntElement;
36117   if (PyType_Ready(&__pyx_type_4lxml_9objectify_BoolElement) < 0) __PYX_ERR(0, 815, __pyx_L1_error)
36118   #if PY_VERSION_HEX < 0x030800B1
36119   __pyx_type_4lxml_9objectify_BoolElement.tp_print = 0;
36120   #endif
36121   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)) {
36122     __pyx_type_4lxml_9objectify_BoolElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36123   }
36124   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolElement, (PyObject *)&__pyx_type_4lxml_9objectify_BoolElement) < 0) __PYX_ERR(0, 815, __pyx_L1_error)
36125   __pyx_ptype_4lxml_9objectify_BoolElement = &__pyx_type_4lxml_9objectify_BoolElement;
36126   if (PyType_Ready(&__pyx_type_4lxml_9objectify_PyType) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
36127   #if PY_VERSION_HEX < 0x030800B1
36128   __pyx_type_4lxml_9objectify_PyType.tp_print = 0;
36129   #endif
36130   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)) {
36131     __pyx_type_4lxml_9objectify_PyType.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36132   }
36133   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyType, (PyObject *)&__pyx_type_4lxml_9objectify_PyType) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
36134   __pyx_ptype_4lxml_9objectify_PyType = &__pyx_type_4lxml_9objectify_PyType;
36135   if (PyType_Ready(&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) __PYX_ERR(0, 1131, __pyx_L1_error)
36136   #if PY_VERSION_HEX < 0x030800B1
36137   __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_print = 0;
36138   #endif
36139   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)) {
36140     __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
36141   }
36142   #if CYTHON_COMPILING_IN_CPYTHON
36143   {
36144     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1131, __pyx_L1_error)
36145     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36146       __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36147       __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__.doc = __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__;
36148       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__;
36149     }
36150   }
36151   #endif
36152   __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = &__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller;
36153   __pyx_vtabptr_4lxml_9objectify_ElementMaker = &__pyx_vtable_4lxml_9objectify_ElementMaker;
36154   __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;
36155   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
36156   #if PY_VERSION_HEX < 0x030800B1
36157   __pyx_type_4lxml_9objectify_ElementMaker.tp_print = 0;
36158   #endif
36159   if (__Pyx_SetVtable(__pyx_type_4lxml_9objectify_ElementMaker.tp_dict, __pyx_vtabptr_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
36160   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementMaker, (PyObject *)&__pyx_type_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
36161   __pyx_ptype_4lxml_9objectify_ElementMaker = &__pyx_type_4lxml_9objectify_ElementMaker;
36162   __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "ElementClassLookup", sizeof(struct LxmlElementClassLookup), __Pyx_ImportType_CheckSize_Warn);
36163    if (!__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup) __PYX_ERR(0, 1, __pyx_L1_error)
36164   __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_base = __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup;
36165   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) __PYX_ERR(0, 1377, __pyx_L1_error)
36166   #if PY_VERSION_HEX < 0x030800B1
36167   __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_print = 0;
36168   #endif
36169   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)) {
36170     __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36171   }
36172   #if CYTHON_COMPILING_IN_CPYTHON
36173   {
36174     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1377, __pyx_L1_error)
36175     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36176       __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36177       __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__.doc = __pyx_doc_4lxml_9objectify_27ObjectifyElementClassLookup___init__;
36178       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__;
36179     }
36180   }
36181   #endif
36182   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectifyElementClassLookup, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) __PYX_ERR(0, 1377, __pyx_L1_error)
36183   __pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = &__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup;
36184   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectPath) < 0) __PYX_ERR(1, 13, __pyx_L1_error)
36185   #if PY_VERSION_HEX < 0x030800B1
36186   __pyx_type_4lxml_9objectify_ObjectPath.tp_print = 0;
36187   #endif
36188   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)) {
36189     __pyx_type_4lxml_9objectify_ObjectPath.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36190   }
36191   #if CYTHON_COMPILING_IN_CPYTHON
36192   {
36193     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectPath, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 13, __pyx_L1_error)
36194     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36195       __pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36196       __pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__.doc = __pyx_doc_4lxml_9objectify_10ObjectPath_6__call__;
36197       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__;
36198     }
36199   }
36200   #endif
36201   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectPath, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectPath) < 0) __PYX_ERR(1, 13, __pyx_L1_error)
36202   __pyx_ptype_4lxml_9objectify_ObjectPath = &__pyx_type_4lxml_9objectify_ObjectPath;
36203   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36204   __Pyx_RefNannyFinishContext();
36205   return 0;
36206   __pyx_L1_error:;
36207   __Pyx_XDECREF(__pyx_t_1);
36208   __Pyx_RefNannyFinishContext();
36209   return -1;
36210 }
36211
36212 static int __Pyx_modinit_type_import_code(void) {
36213   __Pyx_RefNannyDeclarations
36214   PyObject *__pyx_t_1 = NULL;
36215   int __pyx_lineno = 0;
36216   const char *__pyx_filename = NULL;
36217   int __pyx_clineno = 0;
36218   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
36219   /*--- Type import code ---*/
36220   __pyx_t_1 = PyImport_ImportModule("lxml.etree"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 30, __pyx_L1_error)
36221   __Pyx_GOTREF(__pyx_t_1);
36222   __pyx_ptype_4lxml_8includes_11etreepublic__Document = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_Document", sizeof(struct LxmlDocument), __Pyx_ImportType_CheckSize_Warn);
36223    if (!__pyx_ptype_4lxml_8includes_11etreepublic__Document) __PYX_ERR(2, 30, __pyx_L1_error)
36224   __pyx_ptype_4lxml_8includes_11etreepublic__Element = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_Element", sizeof(struct LxmlElement), __Pyx_ImportType_CheckSize_Warn);
36225    if (!__pyx_ptype_4lxml_8includes_11etreepublic__Element) __PYX_ERR(2, 33, __pyx_L1_error)
36226   __pyx_ptype_4lxml_8includes_11etreepublic__ElementTree = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_ElementTree", sizeof(struct LxmlElementTree), __Pyx_ImportType_CheckSize_Warn);
36227    if (!__pyx_ptype_4lxml_8includes_11etreepublic__ElementTree) __PYX_ERR(2, 40, __pyx_L1_error)
36228   __pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "FallbackElementClassLookup", sizeof(struct LxmlFallbackElementClassLookup), __Pyx_ImportType_CheckSize_Warn);
36229    if (!__pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup) __PYX_ERR(2, 47, __pyx_L1_error)
36230   __pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_ElementTagMatcher", sizeof(struct LxmlElementTagMatcher), __Pyx_ImportType_CheckSize_Warn);
36231    if (!__pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher) __PYX_ERR(2, 159, __pyx_L1_error)
36232   __pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_ElementIterator", sizeof(struct LxmlElementIterator), __Pyx_ImportType_CheckSize_Warn);
36233    if (!__pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator) __PYX_ERR(2, 168, __pyx_L1_error)
36234   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36235   __Pyx_RefNannyFinishContext();
36236   return 0;
36237   __pyx_L1_error:;
36238   __Pyx_XDECREF(__pyx_t_1);
36239   __Pyx_RefNannyFinishContext();
36240   return -1;
36241 }
36242
36243 static int __Pyx_modinit_variable_import_code(void) {
36244   __Pyx_RefNannyDeclarations
36245   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
36246   /*--- Variable import code ---*/
36247   __Pyx_RefNannyFinishContext();
36248   return 0;
36249 }
36250
36251 static int __Pyx_modinit_function_import_code(void) {
36252   __Pyx_RefNannyDeclarations
36253   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
36254   /*--- Function import code ---*/
36255   __Pyx_RefNannyFinishContext();
36256   return 0;
36257 }
36258
36259
36260 #ifndef CYTHON_NO_PYINIT_EXPORT
36261 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
36262 #elif PY_MAJOR_VERSION < 3
36263 #ifdef __cplusplus
36264 #define __Pyx_PyMODINIT_FUNC extern "C" void
36265 #else
36266 #define __Pyx_PyMODINIT_FUNC void
36267 #endif
36268 #else
36269 #ifdef __cplusplus
36270 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
36271 #else
36272 #define __Pyx_PyMODINIT_FUNC PyObject *
36273 #endif
36274 #endif
36275
36276
36277 #if PY_MAJOR_VERSION < 3
36278 __Pyx_PyMODINIT_FUNC initobjectify(void) CYTHON_SMALL_CODE; /*proto*/
36279 __Pyx_PyMODINIT_FUNC initobjectify(void)
36280 #else
36281 __Pyx_PyMODINIT_FUNC PyInit_objectify(void) CYTHON_SMALL_CODE; /*proto*/
36282 __Pyx_PyMODINIT_FUNC PyInit_objectify(void)
36283 #if CYTHON_PEP489_MULTI_PHASE_INIT
36284 {
36285   return PyModuleDef_Init(&__pyx_moduledef);
36286 }
36287 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
36288     #if PY_VERSION_HEX >= 0x030700A1
36289     static PY_INT64_T main_interpreter_id = -1;
36290     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
36291     if (main_interpreter_id == -1) {
36292         main_interpreter_id = current_id;
36293         return (unlikely(current_id == -1)) ? -1 : 0;
36294     } else if (unlikely(main_interpreter_id != current_id))
36295     #else
36296     static PyInterpreterState *main_interpreter = NULL;
36297     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
36298     if (!main_interpreter) {
36299         main_interpreter = current_interpreter;
36300     } else if (unlikely(main_interpreter != current_interpreter))
36301     #endif
36302     {
36303         PyErr_SetString(
36304             PyExc_ImportError,
36305             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
36306         return -1;
36307     }
36308     return 0;
36309 }
36310 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) {
36311     PyObject *value = PyObject_GetAttrString(spec, from_name);
36312     int result = 0;
36313     if (likely(value)) {
36314         if (allow_none || value != Py_None) {
36315             result = PyDict_SetItemString(moddict, to_name, value);
36316         }
36317         Py_DECREF(value);
36318     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
36319         PyErr_Clear();
36320     } else {
36321         result = -1;
36322     }
36323     return result;
36324 }
36325 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
36326     PyObject *module = NULL, *moddict, *modname;
36327     if (__Pyx_check_single_interpreter())
36328         return NULL;
36329     if (__pyx_m)
36330         return __Pyx_NewRef(__pyx_m);
36331     modname = PyObject_GetAttrString(spec, "name");
36332     if (unlikely(!modname)) goto bad;
36333     module = PyModule_NewObject(modname);
36334     Py_DECREF(modname);
36335     if (unlikely(!module)) goto bad;
36336     moddict = PyModule_GetDict(module);
36337     if (unlikely(!moddict)) goto bad;
36338     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
36339     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
36340     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
36341     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
36342     return module;
36343 bad:
36344     Py_XDECREF(module);
36345     return NULL;
36346 }
36347
36348
36349 static CYTHON_SMALL_CODE int __pyx_pymod_exec_objectify(PyObject *__pyx_pyinit_module)
36350 #endif
36351 #endif
36352 {
36353   PyObject *__pyx_t_1 = NULL;
36354   PyObject *__pyx_t_2 = NULL;
36355   int __pyx_t_3;
36356   PyObject *__pyx_t_4 = NULL;
36357   int __pyx_lineno = 0;
36358   const char *__pyx_filename = NULL;
36359   int __pyx_clineno = 0;
36360   __Pyx_RefNannyDeclarations
36361   #if CYTHON_PEP489_MULTI_PHASE_INIT
36362   if (__pyx_m) {
36363     if (__pyx_m == __pyx_pyinit_module) return 0;
36364     PyErr_SetString(PyExc_RuntimeError, "Module 'objectify' has already been imported. Re-initialisation is not supported.");
36365     return -1;
36366   }
36367   #elif PY_MAJOR_VERSION >= 3
36368   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
36369   #endif
36370   #if CYTHON_REFNANNY
36371 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
36372 if (!__Pyx_RefNanny) {
36373   PyErr_Clear();
36374   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
36375   if (!__Pyx_RefNanny)
36376       Py_FatalError("failed to import 'refnanny' module");
36377 }
36378 #endif
36379   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_objectify(void)", 0);
36380   if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36381   #ifdef __Pxy_PyFrame_Initialize_Offsets
36382   __Pxy_PyFrame_Initialize_Offsets();
36383   #endif
36384   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
36385   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
36386   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
36387   #ifdef __Pyx_CyFunction_USED
36388   if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36389   #endif
36390   #ifdef __Pyx_FusedFunction_USED
36391   if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36392   #endif
36393   #ifdef __Pyx_Coroutine_USED
36394   if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36395   #endif
36396   #ifdef __Pyx_Generator_USED
36397   if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36398   #endif
36399   #ifdef __Pyx_AsyncGen_USED
36400   if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36401   #endif
36402   #ifdef __Pyx_StopAsyncIteration_USED
36403   if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36404   #endif
36405   /*--- Library function declarations ---*/
36406   /*--- Threads initialization code ---*/
36407   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
36408   #ifdef WITH_THREAD /* Python build with threading support? */
36409   PyEval_InitThreads();
36410   #endif
36411   #endif
36412   /*--- Module creation code ---*/
36413   #if CYTHON_PEP489_MULTI_PHASE_INIT
36414   __pyx_m = __pyx_pyinit_module;
36415   Py_INCREF(__pyx_m);
36416   #else
36417   #if PY_MAJOR_VERSION < 3
36418   __pyx_m = Py_InitModule4("objectify", __pyx_methods, __pyx_k_The_lxml_objectify_module_imple, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
36419   #else
36420   __pyx_m = PyModule_Create(&__pyx_moduledef);
36421   #endif
36422   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
36423   #endif
36424   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
36425   Py_INCREF(__pyx_d);
36426   __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
36427   Py_INCREF(__pyx_b);
36428   __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
36429   Py_INCREF(__pyx_cython_runtime);
36430   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
36431   /*--- Initialize various global constants etc. ---*/
36432   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36433   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
36434   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36435   #endif
36436   if (__pyx_module_is_main_lxml__objectify) {
36437     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36438   }
36439   #if PY_MAJOR_VERSION >= 3
36440   {
36441     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
36442     if (!PyDict_GetItemString(modules, "lxml.objectify")) {
36443       if (unlikely(PyDict_SetItemString(modules, "lxml.objectify", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
36444     }
36445   }
36446   #endif
36447   /*--- Builtin init code ---*/
36448   if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36449   /*--- Constants init code ---*/
36450   if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36451   /*--- Global type/function init code ---*/
36452   (void)__Pyx_modinit_global_init_code();
36453   (void)__Pyx_modinit_variable_export_code();
36454   (void)__Pyx_modinit_function_export_code();
36455   if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
36456   if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
36457   (void)__Pyx_modinit_variable_import_code();
36458   (void)__Pyx_modinit_function_import_code();
36459   /*--- Execution code ---*/
36460   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
36461   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36462   #endif
36463
36464   /* "lxml/objectify.pyx":24
36465  * from libc.string cimport const_char
36466  * 
36467  * __all__ = [u'BoolElement', u'DataElement', u'E', u'Element', u'ElementMaker',             # <<<<<<<<<<<<<<
36468  *            u'FloatElement', u'IntElement', u'LongElement', u'NoneElement',
36469  *            u'NumberElement', u'ObjectPath', u'ObjectifiedDataElement',
36470  */
36471   __pyx_t_1 = PyList_New(32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
36472   __Pyx_GOTREF(__pyx_t_1);
36473   __Pyx_INCREF(__pyx_n_u_BoolElement);
36474   __Pyx_GIVEREF(__pyx_n_u_BoolElement);
36475   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_BoolElement);
36476   __Pyx_INCREF(__pyx_n_u_DataElement);
36477   __Pyx_GIVEREF(__pyx_n_u_DataElement);
36478   PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_DataElement);
36479   __Pyx_INCREF(__pyx_n_u_E);
36480   __Pyx_GIVEREF(__pyx_n_u_E);
36481   PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_E);
36482   __Pyx_INCREF(__pyx_n_u_Element);
36483   __Pyx_GIVEREF(__pyx_n_u_Element);
36484   PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_Element);
36485   __Pyx_INCREF(__pyx_n_u_ElementMaker);
36486   __Pyx_GIVEREF(__pyx_n_u_ElementMaker);
36487   PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_u_ElementMaker);
36488   __Pyx_INCREF(__pyx_n_u_FloatElement);
36489   __Pyx_GIVEREF(__pyx_n_u_FloatElement);
36490   PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_u_FloatElement);
36491   __Pyx_INCREF(__pyx_n_u_IntElement);
36492   __Pyx_GIVEREF(__pyx_n_u_IntElement);
36493   PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_u_IntElement);
36494   __Pyx_INCREF(__pyx_n_u_LongElement);
36495   __Pyx_GIVEREF(__pyx_n_u_LongElement);
36496   PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_u_LongElement);
36497   __Pyx_INCREF(__pyx_n_u_NoneElement);
36498   __Pyx_GIVEREF(__pyx_n_u_NoneElement);
36499   PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_u_NoneElement);
36500   __Pyx_INCREF(__pyx_n_u_NumberElement);
36501   __Pyx_GIVEREF(__pyx_n_u_NumberElement);
36502   PyList_SET_ITEM(__pyx_t_1, 9, __pyx_n_u_NumberElement);
36503   __Pyx_INCREF(__pyx_n_u_ObjectPath);
36504   __Pyx_GIVEREF(__pyx_n_u_ObjectPath);
36505   PyList_SET_ITEM(__pyx_t_1, 10, __pyx_n_u_ObjectPath);
36506   __Pyx_INCREF(__pyx_n_u_ObjectifiedDataElement);
36507   __Pyx_GIVEREF(__pyx_n_u_ObjectifiedDataElement);
36508   PyList_SET_ITEM(__pyx_t_1, 11, __pyx_n_u_ObjectifiedDataElement);
36509   __Pyx_INCREF(__pyx_n_u_ObjectifiedElement);
36510   __Pyx_GIVEREF(__pyx_n_u_ObjectifiedElement);
36511   PyList_SET_ITEM(__pyx_t_1, 12, __pyx_n_u_ObjectifiedElement);
36512   __Pyx_INCREF(__pyx_n_u_ObjectifyElementClassLookup);
36513   __Pyx_GIVEREF(__pyx_n_u_ObjectifyElementClassLookup);
36514   PyList_SET_ITEM(__pyx_t_1, 13, __pyx_n_u_ObjectifyElementClassLookup);
36515   __Pyx_INCREF(__pyx_n_u_PYTYPE_ATTRIBUTE);
36516   __Pyx_GIVEREF(__pyx_n_u_PYTYPE_ATTRIBUTE);
36517   PyList_SET_ITEM(__pyx_t_1, 14, __pyx_n_u_PYTYPE_ATTRIBUTE);
36518   __Pyx_INCREF(__pyx_n_u_PyType);
36519   __Pyx_GIVEREF(__pyx_n_u_PyType);
36520   PyList_SET_ITEM(__pyx_t_1, 15, __pyx_n_u_PyType);
36521   __Pyx_INCREF(__pyx_n_u_StringElement);
36522   __Pyx_GIVEREF(__pyx_n_u_StringElement);
36523   PyList_SET_ITEM(__pyx_t_1, 16, __pyx_n_u_StringElement);
36524   __Pyx_INCREF(__pyx_n_u_SubElement);
36525   __Pyx_GIVEREF(__pyx_n_u_SubElement);
36526   PyList_SET_ITEM(__pyx_t_1, 17, __pyx_n_u_SubElement);
36527   __Pyx_INCREF(__pyx_n_u_XML);
36528   __Pyx_GIVEREF(__pyx_n_u_XML);
36529   PyList_SET_ITEM(__pyx_t_1, 18, __pyx_n_u_XML);
36530   __Pyx_INCREF(__pyx_n_u_annotate);
36531   __Pyx_GIVEREF(__pyx_n_u_annotate);
36532   PyList_SET_ITEM(__pyx_t_1, 19, __pyx_n_u_annotate);
36533   __Pyx_INCREF(__pyx_n_u_deannotate);
36534   __Pyx_GIVEREF(__pyx_n_u_deannotate);
36535   PyList_SET_ITEM(__pyx_t_1, 20, __pyx_n_u_deannotate);
36536   __Pyx_INCREF(__pyx_n_u_dump);
36537   __Pyx_GIVEREF(__pyx_n_u_dump);
36538   PyList_SET_ITEM(__pyx_t_1, 21, __pyx_n_u_dump);
36539   __Pyx_INCREF(__pyx_n_u_enable_recursive_str);
36540   __Pyx_GIVEREF(__pyx_n_u_enable_recursive_str);
36541   PyList_SET_ITEM(__pyx_t_1, 22, __pyx_n_u_enable_recursive_str);
36542   __Pyx_INCREF(__pyx_n_u_fromstring);
36543   __Pyx_GIVEREF(__pyx_n_u_fromstring);
36544   PyList_SET_ITEM(__pyx_t_1, 23, __pyx_n_u_fromstring);
36545   __Pyx_INCREF(__pyx_n_u_getRegisteredTypes);
36546   __Pyx_GIVEREF(__pyx_n_u_getRegisteredTypes);
36547   PyList_SET_ITEM(__pyx_t_1, 24, __pyx_n_u_getRegisteredTypes);
36548   __Pyx_INCREF(__pyx_n_u_makeparser);
36549   __Pyx_GIVEREF(__pyx_n_u_makeparser);
36550   PyList_SET_ITEM(__pyx_t_1, 25, __pyx_n_u_makeparser);
36551   __Pyx_INCREF(__pyx_n_u_parse);
36552   __Pyx_GIVEREF(__pyx_n_u_parse);
36553   PyList_SET_ITEM(__pyx_t_1, 26, __pyx_n_u_parse);
36554   __Pyx_INCREF(__pyx_n_u_pyannotate);
36555   __Pyx_GIVEREF(__pyx_n_u_pyannotate);
36556   PyList_SET_ITEM(__pyx_t_1, 27, __pyx_n_u_pyannotate);
36557   __Pyx_INCREF(__pyx_n_u_pytypename);
36558   __Pyx_GIVEREF(__pyx_n_u_pytypename);
36559   PyList_SET_ITEM(__pyx_t_1, 28, __pyx_n_u_pytypename);
36560   __Pyx_INCREF(__pyx_n_u_set_default_parser);
36561   __Pyx_GIVEREF(__pyx_n_u_set_default_parser);
36562   PyList_SET_ITEM(__pyx_t_1, 29, __pyx_n_u_set_default_parser);
36563   __Pyx_INCREF(__pyx_n_u_set_pytype_attribute_tag);
36564   __Pyx_GIVEREF(__pyx_n_u_set_pytype_attribute_tag);
36565   PyList_SET_ITEM(__pyx_t_1, 30, __pyx_n_u_set_pytype_attribute_tag);
36566   __Pyx_INCREF(__pyx_n_u_xsiannotate);
36567   __Pyx_GIVEREF(__pyx_n_u_xsiannotate);
36568   PyList_SET_ITEM(__pyx_t_1, 31, __pyx_n_u_xsiannotate);
36569   if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
36570   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36571
36572   /* "lxml/objectify.pyx":35
36573  * 
36574  * cdef object etree
36575  * from lxml import etree             # <<<<<<<<<<<<<<
36576  * # initialize C-API of lxml.etree
36577  * import_lxml__etree()
36578  */
36579   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
36580   __Pyx_GOTREF(__pyx_t_1);
36581   __Pyx_INCREF(__pyx_n_s_etree);
36582   __Pyx_GIVEREF(__pyx_n_s_etree);
36583   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_etree);
36584   __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)
36585   __Pyx_GOTREF(__pyx_t_2);
36586   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36587   __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_etree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
36588   __Pyx_GOTREF(__pyx_t_1);
36589   __Pyx_INCREF(__pyx_t_1);
36590   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_etree);
36591   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_etree, __pyx_t_1);
36592   __Pyx_GIVEREF(__pyx_t_1);
36593   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36594   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36595
36596   /* "lxml/objectify.pyx":37
36597  * from lxml import etree
36598  * # initialize C-API of lxml.etree
36599  * import_lxml__etree()             # <<<<<<<<<<<<<<
36600  * 
36601  * __version__ = etree.__version__
36602  */
36603   __pyx_t_3 = import_lxml__etree(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 37, __pyx_L1_error)
36604
36605   /* "lxml/objectify.pyx":39
36606  * import_lxml__etree()
36607  * 
36608  * __version__ = etree.__version__             # <<<<<<<<<<<<<<
36609  * 
36610  * cdef object re
36611  */
36612   __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)
36613   __Pyx_GOTREF(__pyx_t_2);
36614   if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
36615   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36616
36617   /* "lxml/objectify.pyx":42
36618  * 
36619  * cdef object re
36620  * import re             # <<<<<<<<<<<<<<
36621  * 
36622  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
36623  */
36624   __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
36625   __Pyx_GOTREF(__pyx_t_2);
36626   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_re);
36627   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_re, __pyx_t_2);
36628   __Pyx_GIVEREF(__pyx_t_2);
36629   __pyx_t_2 = 0;
36630
36631   /* "lxml/objectify.pyx":44
36632  * import re
36633  * 
36634  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)             # <<<<<<<<<<<<<<
36635  * cdef object is_special_method = re.compile(u'__.*__$').match
36636  * 
36637  */
36638   __Pyx_INCREF(__pyx_tuple__22);
36639   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
36640   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS, __pyx_tuple__22);
36641   __Pyx_GIVEREF(__pyx_tuple__22);
36642
36643   /* "lxml/objectify.pyx":45
36644  * 
36645  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
36646  * cdef object is_special_method = re.compile(u'__.*__$').match             # <<<<<<<<<<<<<<
36647  * 
36648  * 
36649  */
36650   __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)
36651   __Pyx_GOTREF(__pyx_t_2);
36652   __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)
36653   __Pyx_GOTREF(__pyx_t_1);
36654   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36655   __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)
36656   __Pyx_GOTREF(__pyx_t_2);
36657   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36658   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_is_special_method);
36659   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_is_special_method, __pyx_t_2);
36660   __Pyx_GIVEREF(__pyx_t_2);
36661   __pyx_t_2 = 0;
36662
36663   /* "lxml/objectify.pyx":75
36664  * cdef const_xmlChar* _PYTYPE_ATTRIBUTE_NAME
36665  * 
36666  * PYTYPE_ATTRIBUTE = None             # <<<<<<<<<<<<<<
36667  * 
36668  * cdef unicode TREE_PYTYPE_NAME = u"TREE"
36669  */
36670   if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYTYPE_ATTRIBUTE, Py_None) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
36671
36672   /* "lxml/objectify.pyx":77
36673  * PYTYPE_ATTRIBUTE = None
36674  * 
36675  * cdef unicode TREE_PYTYPE_NAME = u"TREE"             # <<<<<<<<<<<<<<
36676  * 
36677  * cdef tuple _unicodeAndUtf8(s):
36678  */
36679   __Pyx_INCREF(__pyx_n_u_TREE);
36680   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
36681   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, __pyx_n_u_TREE);
36682   __Pyx_GIVEREF(__pyx_n_u_TREE);
36683
36684   /* "lxml/objectify.pyx":82
36685  *     return s, python.PyUnicode_AsUTF8String(s)
36686  * 
36687  * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
36688  *     u"""set_pytype_attribute_tag(attribute_tag=None)
36689  *     Change name and namespace of the XML attribute that holds Python type
36690  */
36691   __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)
36692   __Pyx_GOTREF(__pyx_t_2);
36693   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__27);
36694   if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_pytype_attribute_tag, __pyx_t_2) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
36695   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36696
36697   /* "lxml/objectify.pyx":112
36698  *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
36699  * 
36700  * set_pytype_attribute_tag()             # <<<<<<<<<<<<<<
36701  * 
36702  * 
36703  */
36704   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_set_pytype_attribute_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
36705   __Pyx_GOTREF(__pyx_t_2);
36706   __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
36707   __Pyx_GOTREF(__pyx_t_1);
36708   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36709   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36710
36711   /* "lxml/objectify.pyx":118
36712  * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
36713  * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \
36714  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")             # <<<<<<<<<<<<<<
36715  * cdef const_xmlChar* _XML_SCHEMA_NS = _xcstr(XML_SCHEMA_NS_UTF8)
36716  * 
36717  */
36718   __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)
36719   __Pyx_GOTREF(__pyx_t_1);
36720   if (likely(__pyx_t_1 != Py_None)) {
36721     PyObject* sequence = __pyx_t_1;
36722     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
36723     if (unlikely(size != 2)) {
36724       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
36725       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
36726       __PYX_ERR(0, 117, __pyx_L1_error)
36727     }
36728     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
36729     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
36730     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
36731     __Pyx_INCREF(__pyx_t_2);
36732     __Pyx_INCREF(__pyx_t_4);
36733     #else
36734     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
36735     __Pyx_GOTREF(__pyx_t_2);
36736     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
36737     __Pyx_GOTREF(__pyx_t_4);
36738     #endif
36739     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36740   } else {
36741     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 117, __pyx_L1_error)
36742   }
36743
36744   /* "lxml/objectify.pyx":117
36745  * # namespaces for XML Schema
36746  * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
36747  * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \             # <<<<<<<<<<<<<<
36748  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
36749  * cdef const_xmlChar* _XML_SCHEMA_NS = _xcstr(XML_SCHEMA_NS_UTF8)
36750  */
36751   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
36752   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS, __pyx_t_2);
36753   __Pyx_GIVEREF(__pyx_t_2);
36754   __pyx_t_2 = 0;
36755   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
36756   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8, __pyx_t_4);
36757   __Pyx_GIVEREF(__pyx_t_4);
36758   __pyx_t_4 = 0;
36759
36760   /* "lxml/objectify.pyx":119
36761  * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \
36762  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
36763  * cdef const_xmlChar* _XML_SCHEMA_NS = _xcstr(XML_SCHEMA_NS_UTF8)             # <<<<<<<<<<<<<<
36764  * 
36765  * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
36766  */
36767   __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8;
36768   __Pyx_INCREF(__pyx_t_1);
36769   __pyx_v_4lxml_9objectify__XML_SCHEMA_NS = (const xmlChar*)PyBytes_AS_STRING(__pyx_t_1);
36770   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36771
36772   /* "lxml/objectify.pyx":123
36773  * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
36774  * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \
36775  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")             # <<<<<<<<<<<<<<
36776  * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)
36777  * 
36778  */
36779   __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)
36780   __Pyx_GOTREF(__pyx_t_1);
36781   if (likely(__pyx_t_1 != Py_None)) {
36782     PyObject* sequence = __pyx_t_1;
36783     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
36784     if (unlikely(size != 2)) {
36785       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
36786       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
36787       __PYX_ERR(0, 122, __pyx_L1_error)
36788     }
36789     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
36790     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
36791     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
36792     __Pyx_INCREF(__pyx_t_4);
36793     __Pyx_INCREF(__pyx_t_2);
36794     #else
36795     __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
36796     __Pyx_GOTREF(__pyx_t_4);
36797     __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
36798     __Pyx_GOTREF(__pyx_t_2);
36799     #endif
36800     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36801   } else {
36802     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 122, __pyx_L1_error)
36803   }
36804
36805   /* "lxml/objectify.pyx":122
36806  * 
36807  * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
36808  * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \             # <<<<<<<<<<<<<<
36809  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
36810  * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)
36811  */
36812   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
36813   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS, __pyx_t_4);
36814   __Pyx_GIVEREF(__pyx_t_4);
36815   __pyx_t_4 = 0;
36816   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
36817   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8, __pyx_t_2);
36818   __Pyx_GIVEREF(__pyx_t_2);
36819   __pyx_t_2 = 0;
36820
36821   /* "lxml/objectify.pyx":124
36822  * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \
36823  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
36824  * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)             # <<<<<<<<<<<<<<
36825  * 
36826  * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS
36827  */
36828   __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8;
36829   __Pyx_INCREF(__pyx_t_1);
36830   __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS = (const xmlChar*)PyBytes_AS_STRING(__pyx_t_1);
36831   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36832
36833   /* "lxml/objectify.pyx":126
36834  * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)
36835  * 
36836  * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
36837  * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS
36838  * 
36839  */
36840   __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)
36841   __Pyx_GOTREF(__pyx_t_1);
36842   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
36843   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, __pyx_t_1);
36844   __Pyx_GIVEREF(__pyx_t_1);
36845   __pyx_t_1 = 0;
36846
36847   /* "lxml/objectify.pyx":127
36848  * 
36849  * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS
36850  * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
36851  * 
36852  * 
36853  */
36854   __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)
36855   __Pyx_GOTREF(__pyx_t_1);
36856   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
36857   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR, __pyx_t_1);
36858   __Pyx_GIVEREF(__pyx_t_1);
36859   __pyx_t_1 = 0;
36860
36861   /* "lxml/objectify.pyx":162
36862  * 
36863  *     # pickle support for objectified Element
36864  *     def __reduce__(self):             # <<<<<<<<<<<<<<
36865  *         return fromstring, (etree.tostring(self),)
36866  * 
36867  */
36868   __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)
36869   __Pyx_GOTREF(__pyx_t_1);
36870   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)
36871   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36872   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36873
36874   /* "lxml/objectify.pyx":193
36875  *         return _countSiblings(self._c_node)
36876  * 
36877  *     def countchildren(self):             # <<<<<<<<<<<<<<
36878  *         u"""countchildren(self)
36879  * 
36880  */
36881   __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)
36882   __Pyx_GOTREF(__pyx_t_1);
36883   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)
36884   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36885   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36886
36887   /* "lxml/objectify.pyx":210
36888  *         return c
36889  * 
36890  *     def getchildren(self):             # <<<<<<<<<<<<<<
36891  *         u"""getchildren(self)
36892  * 
36893  */
36894   __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)
36895   __Pyx_GOTREF(__pyx_t_1);
36896   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)
36897   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36898   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36899
36900   /* "lxml/objectify.pyx":263
36901  *         self.remove(child)
36902  * 
36903  *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
36904  *         u"""addattr(self, tag, value)
36905  * 
36906  */
36907   __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)
36908   __Pyx_GOTREF(__pyx_t_1);
36909   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)
36910   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36911   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36912
36913   /* "lxml/objectify.pyx":369
36914  *             parent.remove(sibling)
36915  * 
36916  *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
36917  *         u"""descendantpaths(self, prefix=None)
36918  * 
36919  */
36920   __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)
36921   __Pyx_GOTREF(__pyx_t_1);
36922   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)
36923   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36924   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36925
36926   /* "lxml/objectify.pyx":606
36927  *         return strrepr(textOf(self._c_node) or '')
36928  * 
36929  *     def _setText(self, s):             # <<<<<<<<<<<<<<
36930  *         u"""For use in subclasses only. Don't use unless you know what you are
36931  *         doing.
36932  */
36933   __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)
36934   __Pyx_GOTREF(__pyx_t_1);
36935   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)
36936   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36937   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement);
36938
36939   /* "lxml/objectify.pyx":614
36940  * cdef class NumberElement(ObjectifiedDataElement):
36941  *     cdef object _parse_value
36942  *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
36943  *         u"""Set the function that parses the Python value from a string.
36944  * 
36945  */
36946   __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)
36947   __Pyx_GOTREF(__pyx_t_1);
36948   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)
36949   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36950   PyType_Modified(__pyx_ptype_4lxml_9objectify_NumberElement);
36951
36952   /* "lxml/objectify.pyx":634
36953  *         return float(_parseNumber(self))
36954  * 
36955  *     def __complex__(self):             # <<<<<<<<<<<<<<
36956  *         return complex(_parseNumber(self))
36957  * 
36958  */
36959   __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)
36960   __Pyx_GOTREF(__pyx_t_1);
36961   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)
36962   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36963   PyType_Modified(__pyx_ptype_4lxml_9objectify_NumberElement);
36964
36965   /* "lxml/objectify.pyx":710
36966  * 
36967  * cdef class IntElement(NumberElement):
36968  *     def _init(self):             # <<<<<<<<<<<<<<
36969  *         self._parse_value = int
36970  * 
36971  */
36972   __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)
36973   __Pyx_GOTREF(__pyx_t_1);
36974   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)
36975   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36976   PyType_Modified(__pyx_ptype_4lxml_9objectify_IntElement);
36977
36978   /* "lxml/objectify.pyx":717
36979  * 
36980  * cdef class LongElement(NumberElement):
36981  *     def _init(self):             # <<<<<<<<<<<<<<
36982  *         self._parse_value = long
36983  * 
36984  */
36985   __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)
36986   __Pyx_GOTREF(__pyx_t_1);
36987   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)
36988   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36989   PyType_Modified(__pyx_ptype_4lxml_9objectify_LongElement);
36990
36991   /* "lxml/objectify.pyx":724
36992  * 
36993  * cdef class FloatElement(NumberElement):
36994  *     def _init(self):             # <<<<<<<<<<<<<<
36995  *         self._parse_value = float
36996  * 
36997  */
36998   __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)
36999   __Pyx_GOTREF(__pyx_t_1);
37000   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)
37001   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37002   PyType_Modified(__pyx_ptype_4lxml_9objectify_FloatElement);
37003
37004   /* "lxml/objectify.pyx":741
37005  *         return repr(textOf(self._c_node) or u'')
37006  * 
37007  *     def strlen(self):             # <<<<<<<<<<<<<<
37008  *         text = textOf(self._c_node)
37009  *         if text is None:
37010  */
37011   __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)
37012   __Pyx_GOTREF(__pyx_t_1);
37013   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)
37014   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37015   PyType_Modified(__pyx_ptype_4lxml_9objectify_StringElement);
37016
37017   /* "lxml/objectify.pyx":786
37018  *         return float(textOf(self._c_node))
37019  * 
37020  *     def __complex__(self):             # <<<<<<<<<<<<<<
37021  *         return complex(textOf(self._c_node))
37022  * 
37023  */
37024   __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)
37025   __Pyx_GOTREF(__pyx_t_1);
37026   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)
37027   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37028   PyType_Modified(__pyx_ptype_4lxml_9objectify_StringElement);
37029
37030   /* "lxml/objectify.pyx":821
37031  *     Python's bool type.
37032  *     """
37033  *     def _init(self):             # <<<<<<<<<<<<<<
37034  *         self._parse_value = __parseBool
37035  * 
37036  */
37037   __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)
37038   __Pyx_GOTREF(__pyx_t_1);
37039   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)
37040   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37041   PyType_Modified(__pyx_ptype_4lxml_9objectify_BoolElement);
37042
37043   /* "lxml/objectify.pyx":843
37044  *         return __parseBool(textOf(self._c_node))
37045  * 
37046  * def __checkBool(s):             # <<<<<<<<<<<<<<
37047  *     cdef int value = -1
37048  *     if s is not None:
37049  */
37050   __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)
37051   __Pyx_GOTREF(__pyx_t_1);
37052   if (PyDict_SetItem(__pyx_d, __pyx_n_s_checkBool, __pyx_t_1) < 0) __PYX_ERR(0, 843, __pyx_L1_error)
37053   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37054
37055   /* "lxml/objectify.pyx":850
37056  *         raise ValueError
37057  * 
37058  * cpdef bint __parseBool(s) except -1:             # <<<<<<<<<<<<<<
37059  *     cdef int value
37060  *     if s is None:
37061  */
37062   __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)
37063   __Pyx_GOTREF(__pyx_t_1);
37064   if (PyDict_SetItem(__pyx_d, __pyx_n_s_parseBool, __pyx_t_1) < 0) __PYX_ERR(0, 850, __pyx_L1_error)
37065   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37066
37067   /* "lxml/objectify.pyx":948
37068  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
37069  * 
37070  *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
37071  *         u"""register(self, before=None, after=None)
37072  * 
37073  */
37074   __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)
37075   __Pyx_GOTREF(__pyx_t_1);
37076   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)
37077   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37078   PyType_Modified(__pyx_ptype_4lxml_9objectify_PyType);
37079
37080   /* "lxml/objectify.pyx":989
37081  *             _SCHEMA_TYPE_DICT[xs_type] = self
37082  * 
37083  *     def unregister(self):             # <<<<<<<<<<<<<<
37084  *         u"unregister(self)"
37085  *         if _PYTYPE_DICT.get(self.name) is self:
37086  */
37087   __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)
37088   __Pyx_GOTREF(__pyx_t_1);
37089   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)
37090   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37091   PyType_Modified(__pyx_ptype_4lxml_9objectify_PyType);
37092
37093   /* "lxml/objectify.pyx":1014
37094  * 
37095  * 
37096  * cdef dict _PYTYPE_DICT = {}             # <<<<<<<<<<<<<<
37097  * cdef dict _SCHEMA_TYPE_DICT = {}
37098  * cdef list _TYPE_CHECKS = []
37099  */
37100   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
37101   __Pyx_GOTREF(__pyx_t_1);
37102   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__PYTYPE_DICT);
37103   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__PYTYPE_DICT, ((PyObject*)__pyx_t_1));
37104   __Pyx_GIVEREF(__pyx_t_1);
37105   __pyx_t_1 = 0;
37106
37107   /* "lxml/objectify.pyx":1015
37108  * 
37109  * cdef dict _PYTYPE_DICT = {}
37110  * cdef dict _SCHEMA_TYPE_DICT = {}             # <<<<<<<<<<<<<<
37111  * cdef list _TYPE_CHECKS = []
37112  * 
37113  */
37114   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
37115   __Pyx_GOTREF(__pyx_t_1);
37116   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
37117   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, ((PyObject*)__pyx_t_1));
37118   __Pyx_GIVEREF(__pyx_t_1);
37119   __pyx_t_1 = 0;
37120
37121   /* "lxml/objectify.pyx":1016
37122  * cdef dict _PYTYPE_DICT = {}
37123  * cdef dict _SCHEMA_TYPE_DICT = {}
37124  * cdef list _TYPE_CHECKS = []             # <<<<<<<<<<<<<<
37125  * 
37126  * def __lower_bool(b):
37127  */
37128   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
37129   __Pyx_GOTREF(__pyx_t_1);
37130   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__TYPE_CHECKS);
37131   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__TYPE_CHECKS, ((PyObject*)__pyx_t_1));
37132   __Pyx_GIVEREF(__pyx_t_1);
37133   __pyx_t_1 = 0;
37134
37135   /* "lxml/objectify.pyx":1018
37136  * cdef list _TYPE_CHECKS = []
37137  * 
37138  * def __lower_bool(b):             # <<<<<<<<<<<<<<
37139  *     return u"true" if b else u"false"
37140  * 
37141  */
37142   __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)
37143   __Pyx_GOTREF(__pyx_t_1);
37144   if (PyDict_SetItem(__pyx_d, __pyx_n_s_lower_bool, __pyx_t_1) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)
37145   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37146
37147   /* "lxml/objectify.pyx":1024
37148  *     return u"str" if python._isString(obj) else _typename(obj)
37149  * 
37150  * def pytypename(obj):             # <<<<<<<<<<<<<<
37151  *     u"""pytypename(obj)
37152  * 
37153  */
37154   __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)
37155   __Pyx_GOTREF(__pyx_t_1);
37156   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pytypename, __pyx_t_1) < 0) __PYX_ERR(0, 1024, __pyx_L1_error)
37157   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37158
37159   /* "lxml/objectify.pyx":1066
37160  * 
37161  * # non-registered PyType for inner tree elements
37162  * cdef PyType TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)             # <<<<<<<<<<<<<<
37163  * 
37164  * _registerPyTypes()
37165  */
37166   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
37167   __Pyx_GOTREF(__pyx_t_1);
37168   __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
37169   __Pyx_GIVEREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
37170   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
37171   __Pyx_INCREF(Py_None);
37172   __Pyx_GIVEREF(Py_None);
37173   PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
37174   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
37175   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
37176   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
37177   __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)
37178   __Pyx_GOTREF(__pyx_t_2);
37179   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37180   __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
37181   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_TREE_PYTYPE, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2));
37182   __Pyx_GIVEREF(__pyx_t_2);
37183   __pyx_t_2 = 0;
37184
37185   /* "lxml/objectify.pyx":1068
37186  * cdef PyType TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)
37187  * 
37188  * _registerPyTypes()             # <<<<<<<<<<<<<<
37189  * 
37190  * def getRegisteredTypes():
37191  */
37192   __pyx_t_2 = __pyx_f_4lxml_9objectify__registerPyTypes(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error)
37193   __Pyx_GOTREF(__pyx_t_2);
37194   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37195
37196   /* "lxml/objectify.pyx":1070
37197  * _registerPyTypes()
37198  * 
37199  * def getRegisteredTypes():             # <<<<<<<<<<<<<<
37200  *     u"""getRegisteredTypes()
37201  * 
37202  */
37203   __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)
37204   __Pyx_GOTREF(__pyx_t_2);
37205   if (PyDict_SetItem(__pyx_d, __pyx_n_s_getRegisteredTypes, __pyx_t_2) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
37206   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37207
37208   /* "lxml/objectify.pyx":1303
37209  * # Recursive element dumping
37210  * 
37211  * cdef bint __RECURSIVE_STR = 0 # default: off             # <<<<<<<<<<<<<<
37212  * 
37213  * def enable_recursive_str(on=True):
37214  */
37215   __pyx_v_4lxml_9objectify___RECURSIVE_STR = 0;
37216
37217   /* "lxml/objectify.pyx":1305
37218  * cdef bint __RECURSIVE_STR = 0 # default: off
37219  * 
37220  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
37221  *     u"""enable_recursive_str(on=True)
37222  * 
37223  */
37224   __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)
37225   __Pyx_GOTREF(__pyx_t_2);
37226   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__72);
37227   if (PyDict_SetItem(__pyx_d, __pyx_n_s_enable_recursive_str, __pyx_t_2) < 0) __PYX_ERR(0, 1305, __pyx_L1_error)
37228   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37229
37230   /* "lxml/objectify.pyx":1314
37231  *     __RECURSIVE_STR = on
37232  * 
37233  * def dump(_Element element not None):             # <<<<<<<<<<<<<<
37234  *     u"""dump(_Element element not None)
37235  * 
37236  */
37237   __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)
37238   __Pyx_GOTREF(__pyx_t_2);
37239   if (PyDict_SetItem(__pyx_d, __pyx_n_s_dump, __pyx_t_2) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
37240   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37241
37242   /* "lxml/objectify.pyx":1357
37243  * # Pickle support for objectified ElementTree
37244  * 
37245  * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
37246  *     return etree.ElementTree(fromstring(data))
37247  * 
37248  */
37249   __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)
37250   __Pyx_GOTREF(__pyx_t_2);
37251   if (PyDict_SetItem(__pyx_d, __pyx_n_s_unpickleElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
37252   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37253
37254   /* "lxml/objectify.pyx":1368
37255  *                    elementTreeReduceFunction, __unpickleElementTree)
37256  * 
37257  * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
37258  *     return __unpickleElementTree, (etree.tostring(obj),)
37259  * 
37260  */
37261   __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)
37262   __Pyx_GOTREF(__pyx_t_2);
37263   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pickleReduceElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 1368, __pyx_L1_error)
37264   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37265
37266   /* "lxml/objectify.pyx":1371
37267  *     return __unpickleElementTree, (etree.tostring(obj),)
37268  * 
37269  * _setupPickle(pickleReduceElementTree)             # <<<<<<<<<<<<<<
37270  * del pickleReduceElementTree
37271  * 
37272  */
37273   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickleReduceElementTree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error)
37274   __Pyx_GOTREF(__pyx_t_2);
37275   __pyx_t_1 = __pyx_f_4lxml_9objectify__setupPickle(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
37276   __Pyx_GOTREF(__pyx_t_1);
37277   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37278   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37279
37280   /* "lxml/objectify.pyx":1372
37281  * 
37282  * _setupPickle(pickleReduceElementTree)
37283  * del pickleReduceElementTree             # <<<<<<<<<<<<<<
37284  * 
37285  * ################################################################################
37286  */
37287   if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_pickleReduceElementTree) < 0) __PYX_ERR(0, 1372, __pyx_L1_error)
37288
37289   /* "lxml/objectify.pyx":1462
37290  *     return None
37291  * 
37292  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
37293  *              empty_pytype=None):
37294  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
37295  */
37296   __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
37297   __Pyx_GOTREF(__pyx_t_1);
37298   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_old, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1462, __pyx_L1_error)
37299   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_xsi, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1462, __pyx_L1_error)
37300   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_pytype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1462, __pyx_L1_error)
37301   __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)
37302   __Pyx_GOTREF(__pyx_t_2);
37303   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37304   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37305   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyannotate, __pyx_t_2) < 0) __PYX_ERR(0, 1462, __pyx_L1_error)
37306   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37307
37308   /* "lxml/objectify.pyx":1485
37309  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
37310  * 
37311  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
37312  *                 empty_type=None):
37313  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
37314  */
37315   __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error)
37316   __Pyx_GOTREF(__pyx_t_2);
37317   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_old, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1485, __pyx_L1_error)
37318   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_pytype, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1485, __pyx_L1_error)
37319   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_empty_type, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1485, __pyx_L1_error)
37320   __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)
37321   __Pyx_GOTREF(__pyx_t_1);
37322   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2);
37323   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37324   if (PyDict_SetItem(__pyx_d, __pyx_n_s_xsiannotate, __pyx_t_1) < 0) __PYX_ERR(0, 1485, __pyx_L1_error)
37325   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37326
37327   /* "lxml/objectify.pyx":1513
37328  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
37329  * 
37330  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
37331  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
37332  *              annotate_pytype=1):
37333  */
37334   __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
37335   __Pyx_GOTREF(__pyx_t_1);
37336   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_old, ((PyObject *)Py_True)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37337   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_xsi, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37338   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_pytype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37339   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_type, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37340   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_annotate_xsi, ((PyObject *)__pyx_int_0)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37341   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_annotate_pytype, ((PyObject *)__pyx_int_1)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37342   __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)
37343   __Pyx_GOTREF(__pyx_t_2);
37344   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37345   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37346   if (PyDict_SetItem(__pyx_d, __pyx_n_s_annotate, __pyx_t_2) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37347   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37348
37349   /* "lxml/objectify.pyx":1706
37350  *     return 0
37351  * 
37352  * cdef object _strip_attributes = etree.strip_attributes             # <<<<<<<<<<<<<<
37353  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
37354  * 
37355  */
37356   __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)
37357   __Pyx_GOTREF(__pyx_t_2);
37358   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__strip_attributes);
37359   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__strip_attributes, __pyx_t_2);
37360   __Pyx_GIVEREF(__pyx_t_2);
37361   __pyx_t_2 = 0;
37362
37363   /* "lxml/objectify.pyx":1707
37364  * 
37365  * cdef object _strip_attributes = etree.strip_attributes
37366  * cdef object _cleanup_namespaces = etree.cleanup_namespaces             # <<<<<<<<<<<<<<
37367  * 
37368  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,
37369  */
37370   __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)
37371   __Pyx_GOTREF(__pyx_t_2);
37372   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__cleanup_namespaces);
37373   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__cleanup_namespaces, __pyx_t_2);
37374   __Pyx_GIVEREF(__pyx_t_2);
37375   __pyx_t_2 = 0;
37376
37377   /* "lxml/objectify.pyx":1709
37378  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
37379  * 
37380  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
37381  *                bint xsi_nil=False, bint cleanup_namespaces=False):
37382  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
37383  */
37384   __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
37385   __Pyx_GOTREF(__pyx_t_2);
37386   __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error)
37387   __Pyx_GOTREF(__pyx_t_1);
37388   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pytype, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37389   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37390   __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error)
37391   __Pyx_GOTREF(__pyx_t_1);
37392   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_2, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37393   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37394
37395   /* "lxml/objectify.pyx":1710
37396  * 
37397  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,
37398  *                bint xsi_nil=False, bint cleanup_namespaces=False):             # <<<<<<<<<<<<<<
37399  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
37400  * 
37401  */
37402   __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
37403   __Pyx_GOTREF(__pyx_t_1);
37404   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_nil, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37405   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37406   __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
37407   __Pyx_GOTREF(__pyx_t_1);
37408   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cleanup_namespaces, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37409   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37410
37411   /* "lxml/objectify.pyx":1709
37412  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
37413  * 
37414  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
37415  *                bint xsi_nil=False, bint cleanup_namespaces=False):
37416  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
37417  */
37418   __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)
37419   __Pyx_GOTREF(__pyx_t_1);
37420   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2);
37421   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37422   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deannotate, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37423   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37424
37425   /* "lxml/objectify.pyx":1743
37426  * 
37427  * cdef object __DEFAULT_PARSER
37428  * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)             # <<<<<<<<<<<<<<
37429  * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )
37430  * 
37431  */
37432   __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)
37433   __Pyx_GOTREF(__pyx_t_1);
37434   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1743, __pyx_L1_error)
37435   __Pyx_GOTREF(__pyx_t_2);
37436   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_remove_blank_text, Py_True) < 0) __PYX_ERR(0, 1743, __pyx_L1_error)
37437   __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)
37438   __Pyx_GOTREF(__pyx_t_4);
37439   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37440   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37441   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37442   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_t_4);
37443   __Pyx_GIVEREF(__pyx_t_4);
37444   __pyx_t_4 = 0;
37445
37446   /* "lxml/objectify.pyx":1744
37447  * cdef object __DEFAULT_PARSER
37448  * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)
37449  * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<<
37450  * 
37451  * cdef object objectify_parser
37452  */
37453   __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)
37454   __Pyx_GOTREF(__pyx_t_4);
37455   __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1744, __pyx_L1_error)
37456   __Pyx_GOTREF(__pyx_t_2);
37457   __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1744, __pyx_L1_error)
37458   __Pyx_GOTREF(__pyx_t_1);
37459   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37460   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37461   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37462
37463   /* "lxml/objectify.pyx":1747
37464  * 
37465  * cdef object objectify_parser
37466  * objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<<
37467  * 
37468  * def set_default_parser(new_parser = None):
37469  */
37470   __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37471   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
37472   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37473   __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37474
37475   /* "lxml/objectify.pyx":1749
37476  * objectify_parser = __DEFAULT_PARSER
37477  * 
37478  * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
37479  *     u"""set_default_parser(new_parser = None)
37480  * 
37481  */
37482   __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)
37483   __Pyx_GOTREF(__pyx_t_1);
37484   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__89);
37485   if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_parser, __pyx_t_1) < 0) __PYX_ERR(0, 1749, __pyx_L1_error)
37486   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37487
37488   /* "lxml/objectify.pyx":1767
37489  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
37490  * 
37491  * def makeparser(**kw):             # <<<<<<<<<<<<<<
37492  *     u"""makeparser(remove_blank_text=True, **kw)
37493  * 
37494  */
37495   __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)
37496   __Pyx_GOTREF(__pyx_t_1);
37497   if (PyDict_SetItem(__pyx_d, __pyx_n_s_makeparser, __pyx_t_1) < 0) __PYX_ERR(0, 1767, __pyx_L1_error)
37498   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37499
37500   /* "lxml/objectify.pyx":1790
37501  * 
37502  * cdef object _fromstring
37503  * _fromstring = etree.fromstring             # <<<<<<<<<<<<<<
37504  * 
37505  * SubElement = etree.SubElement
37506  */
37507   __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)
37508   __Pyx_GOTREF(__pyx_t_1);
37509   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__fromstring);
37510   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__fromstring, __pyx_t_1);
37511   __Pyx_GIVEREF(__pyx_t_1);
37512   __pyx_t_1 = 0;
37513
37514   /* "lxml/objectify.pyx":1792
37515  * _fromstring = etree.fromstring
37516  * 
37517  * SubElement = etree.SubElement             # <<<<<<<<<<<<<<
37518  * 
37519  * def fromstring(xml, parser=None, *, base_url=None):
37520  */
37521   __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)
37522   __Pyx_GOTREF(__pyx_t_1);
37523   if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubElement, __pyx_t_1) < 0) __PYX_ERR(0, 1792, __pyx_L1_error)
37524   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37525
37526   /* "lxml/objectify.pyx":1794
37527  * SubElement = etree.SubElement
37528  * 
37529  * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
37530  *     u"""fromstring(xml, parser=None, base_url=None)
37531  * 
37532  */
37533   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1794, __pyx_L1_error)
37534   __Pyx_GOTREF(__pyx_t_1);
37535   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1794, __pyx_L1_error)
37536   __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)
37537   __Pyx_GOTREF(__pyx_t_2);
37538   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__94);
37539   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37540   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37541   if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_2) < 0) __PYX_ERR(0, 1794, __pyx_L1_error)
37542   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37543
37544   /* "lxml/objectify.pyx":1810
37545  *     return _fromstring(xml, parser, base_url=base_url)
37546  * 
37547  * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
37548  *     u"""XML(xml, parser=None, base_url=None)
37549  * 
37550  */
37551   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __pyx_L1_error)
37552   __Pyx_GOTREF(__pyx_t_2);
37553   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)
37554   __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)
37555   __Pyx_GOTREF(__pyx_t_1);
37556   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__97);
37557   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2);
37558   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37559   if (PyDict_SetItem(__pyx_d, __pyx_n_s_XML, __pyx_t_1) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)
37560   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37561
37562   /* "lxml/objectify.pyx":1827
37563  * 
37564  * cdef object _parse
37565  * _parse = etree.parse             # <<<<<<<<<<<<<<
37566  * 
37567  * def parse(f, parser=None, *, base_url=None):
37568  */
37569   __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)
37570   __Pyx_GOTREF(__pyx_t_1);
37571   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__parse);
37572   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__parse, __pyx_t_1);
37573   __Pyx_GIVEREF(__pyx_t_1);
37574   __pyx_t_1 = 0;
37575
37576   /* "lxml/objectify.pyx":1829
37577  * _parse = etree.parse
37578  * 
37579  * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
37580  *     u"""parse(f, parser=None, base_url=None)
37581  * 
37582  */
37583   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1829, __pyx_L1_error)
37584   __Pyx_GOTREF(__pyx_t_1);
37585   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1829, __pyx_L1_error)
37586   __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)
37587   __Pyx_GOTREF(__pyx_t_2);
37588   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__100);
37589   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37590   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37591   if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_2) < 0) __PYX_ERR(0, 1829, __pyx_L1_error)
37592   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37593
37594   /* "lxml/objectify.pyx":1845
37595  * 
37596  * cdef dict _DEFAULT_NSMAP = {
37597  *     "py"  : PYTYPE_NAMESPACE,             # <<<<<<<<<<<<<<
37598  *     "xsi" : XML_SCHEMA_INSTANCE_NS,
37599  *     "xsd" : XML_SCHEMA_NS
37600  */
37601   __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error)
37602   __Pyx_GOTREF(__pyx_t_2);
37603   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)
37604
37605   /* "lxml/objectify.pyx":1846
37606  * cdef dict _DEFAULT_NSMAP = {
37607  *     "py"  : PYTYPE_NAMESPACE,
37608  *     "xsi" : XML_SCHEMA_INSTANCE_NS,             # <<<<<<<<<<<<<<
37609  *     "xsd" : XML_SCHEMA_NS
37610  * }
37611  */
37612   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)
37613
37614   /* "lxml/objectify.pyx":1847
37615  *     "py"  : PYTYPE_NAMESPACE,
37616  *     "xsi" : XML_SCHEMA_INSTANCE_NS,
37617  *     "xsd" : XML_SCHEMA_NS             # <<<<<<<<<<<<<<
37618  * }
37619  * 
37620  */
37621   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)
37622   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
37623   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP, ((PyObject*)__pyx_t_2));
37624   __Pyx_GIVEREF(__pyx_t_2);
37625   __pyx_t_2 = 0;
37626
37627   /* "lxml/objectify.pyx":1850
37628  * }
37629  * 
37630  * E = ElementMaker()             # <<<<<<<<<<<<<<
37631  * 
37632  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):
37633  */
37634   __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ElementMaker)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L1_error)
37635   __Pyx_GOTREF(__pyx_t_2);
37636   if (PyDict_SetItem(__pyx_d, __pyx_n_s_E, __pyx_t_2) < 0) __PYX_ERR(0, 1850, __pyx_L1_error)
37637   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37638
37639   /* "lxml/objectify.pyx":1852
37640  * E = ElementMaker()
37641  * 
37642  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
37643  *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
37644  * 
37645  */
37646   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1852, __pyx_L1_error)
37647   __Pyx_GOTREF(__pyx_t_2);
37648   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pytype_2, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
37649   __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)
37650   __Pyx_GOTREF(__pyx_t_1);
37651   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__103);
37652   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2);
37653   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37654   if (PyDict_SetItem(__pyx_d, __pyx_n_s_Element, __pyx_t_1) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
37655   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37656
37657   /* "lxml/objectify.pyx":1872
37658  *     return _makeElement(_tag, None, _attributes, nsmap)
37659  * 
37660  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
37661  *                 **_attributes):
37662  *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
37663  */
37664   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1872, __pyx_L1_error)
37665   __Pyx_GOTREF(__pyx_t_1);
37666   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pytype_2, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1872, __pyx_L1_error)
37667   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_xsi_3, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1872, __pyx_L1_error)
37668   __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)
37669   __Pyx_GOTREF(__pyx_t_2);
37670   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__106);
37671   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37672   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37673   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataElement, __pyx_t_2) < 0) __PYX_ERR(0, 1872, __pyx_L1_error)
37674   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37675
37676   /* "src/lxml/objectpath.pxi":10
37677  * 
37678  * 
37679  * cdef object _NO_DEFAULT = object()             # <<<<<<<<<<<<<<
37680  * 
37681  * 
37682  */
37683   __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error)
37684   __Pyx_GOTREF(__pyx_t_2);
37685   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__NO_DEFAULT);
37686   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__NO_DEFAULT, __pyx_t_2);
37687   __Pyx_GIVEREF(__pyx_t_2);
37688   __pyx_t_2 = 0;
37689
37690   /* "src/lxml/objectpath.pxi":57
37691  *         return _find_object_path(root, self._c_path, self._path_len, default)
37692  * 
37693  *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
37694  *         u"hasattr(self, root)"
37695  *         try:
37696  */
37697   __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)
37698   __Pyx_GOTREF(__pyx_t_2);
37699   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)
37700   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37701   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectPath);
37702
37703   /* "src/lxml/objectpath.pxi":65
37704  *         return True
37705  * 
37706  *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
37707  *         u"""setattr(self, root, value)
37708  * 
37709  */
37710   __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)
37711   __Pyx_GOTREF(__pyx_t_2);
37712   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)
37713   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37714   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectPath);
37715
37716   /* "src/lxml/objectpath.pxi":74
37717  *         _create_object_path(root, self._c_path, self._path_len, 1, value)
37718  * 
37719  *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
37720  *         u"""addattr(self, root, value)
37721  * 
37722  */
37723   __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)
37724   __Pyx_GOTREF(__pyx_t_2);
37725   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)
37726   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37727   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectPath);
37728
37729   /* "src/lxml/objectpath.pxi":84
37730  * 
37731  * 
37732  * cdef object __MATCH_PATH_SEGMENT = re.compile(             # <<<<<<<<<<<<<<
37733  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
37734  *     re.U).match
37735  */
37736   __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)
37737   __Pyx_GOTREF(__pyx_t_2);
37738
37739   /* "src/lxml/objectpath.pxi":86
37740  * cdef object __MATCH_PATH_SEGMENT = re.compile(
37741  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
37742  *     re.U).match             # <<<<<<<<<<<<<<
37743  * 
37744  * cdef tuple _RELATIVE_PATH_SEGMENT = (None, None, 0)
37745  */
37746   __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)
37747   __Pyx_GOTREF(__pyx_t_1);
37748
37749   /* "src/lxml/objectpath.pxi":84
37750  * 
37751  * 
37752  * cdef object __MATCH_PATH_SEGMENT = re.compile(             # <<<<<<<<<<<<<<
37753  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
37754  *     re.U).match
37755  */
37756   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 84, __pyx_L1_error)
37757   __Pyx_GOTREF(__pyx_t_4);
37758   __Pyx_INCREF(__pyx_kp_u_s_s_s_s_s_0_9_s);
37759   __Pyx_GIVEREF(__pyx_kp_u_s_s_s_s_s_0_9_s);
37760   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_s_s_s_s_s_0_9_s);
37761   __Pyx_GIVEREF(__pyx_t_1);
37762   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
37763   __pyx_t_1 = 0;
37764   __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)
37765   __Pyx_GOTREF(__pyx_t_1);
37766   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37767   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37768
37769   /* "src/lxml/objectpath.pxi":86
37770  * cdef object __MATCH_PATH_SEGMENT = re.compile(
37771  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
37772  *     re.U).match             # <<<<<<<<<<<<<<
37773  * 
37774  * cdef tuple _RELATIVE_PATH_SEGMENT = (None, None, 0)
37775  */
37776   __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)
37777   __Pyx_GOTREF(__pyx_t_4);
37778   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37779   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
37780   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT, __pyx_t_4);
37781   __Pyx_GIVEREF(__pyx_t_4);
37782   __pyx_t_4 = 0;
37783
37784   /* "src/lxml/objectpath.pxi":88
37785  *     re.U).match
37786  * 
37787  * cdef tuple _RELATIVE_PATH_SEGMENT = (None, None, 0)             # <<<<<<<<<<<<<<
37788  * 
37789  * 
37790  */
37791   __Pyx_INCREF(__pyx_tuple__113);
37792   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
37793   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT, __pyx_tuple__113);
37794   __Pyx_GIVEREF(__pyx_tuple__113);
37795
37796   /* "lxml/objectify.pyx":1
37797  * # cython: binding=True             # <<<<<<<<<<<<<<
37798  * # cython: auto_pickle=False
37799  * # cython: language_level=2
37800  */
37801   __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
37802   __Pyx_GOTREF(__pyx_t_4);
37803   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
37804   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37805
37806   /*--- Wrapped vars code ---*/
37807
37808   if (__Pyx_RegisterCleanup()) __PYX_ERR(0, 1, __pyx_L1_error);
37809   goto __pyx_L0;
37810   __pyx_L1_error:;
37811   __Pyx_XDECREF(__pyx_t_1);
37812   __Pyx_XDECREF(__pyx_t_2);
37813   __Pyx_XDECREF(__pyx_t_4);
37814   if (__pyx_m) {
37815     if (__pyx_d) {
37816       __Pyx_AddTraceback("init lxml.objectify", __pyx_clineno, __pyx_lineno, __pyx_filename);
37817     }
37818     Py_CLEAR(__pyx_m);
37819   } else if (!PyErr_Occurred()) {
37820     PyErr_SetString(PyExc_ImportError, "init lxml.objectify");
37821   }
37822   __pyx_L0:;
37823   __Pyx_RefNannyFinishContext();
37824   #if CYTHON_PEP489_MULTI_PHASE_INIT
37825   return (__pyx_m != NULL) ? 0 : -1;
37826   #elif PY_MAJOR_VERSION >= 3
37827   return __pyx_m;
37828   #else
37829   return;
37830   #endif
37831 }
37832
37833 static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(void) {
37834   Py_CLEAR(__pyx_slice__3);
37835   Py_CLEAR(__pyx_tuple__5);
37836   Py_CLEAR(__pyx_tuple__6);
37837   Py_CLEAR(__pyx_tuple__7);
37838   Py_CLEAR(__pyx_tuple__8);
37839   Py_CLEAR(__pyx_slice__16);
37840   Py_CLEAR(__pyx_tuple__18);
37841   Py_CLEAR(__pyx_tuple__22);
37842   Py_CLEAR(__pyx_tuple__24);
37843   Py_CLEAR(__pyx_tuple__25);
37844   Py_CLEAR(__pyx_codeobj__26);
37845   Py_CLEAR(__pyx_tuple__27);
37846   Py_CLEAR(__pyx_tuple__28);
37847   Py_CLEAR(__pyx_codeobj__29);
37848   Py_CLEAR(__pyx_tuple__30);
37849   Py_CLEAR(__pyx_codeobj__31);
37850   Py_CLEAR(__pyx_tuple__32);
37851   Py_CLEAR(__pyx_codeobj__33);
37852   Py_CLEAR(__pyx_tuple__34);
37853   Py_CLEAR(__pyx_codeobj__35);
37854   Py_CLEAR(__pyx_tuple__36);
37855   Py_CLEAR(__pyx_codeobj__37);
37856   Py_CLEAR(__pyx_tuple__38);
37857   Py_CLEAR(__pyx_codeobj__39);
37858   Py_CLEAR(__pyx_tuple__40);
37859   Py_CLEAR(__pyx_codeobj__41);
37860   Py_CLEAR(__pyx_tuple__42);
37861   Py_CLEAR(__pyx_codeobj__43);
37862   Py_CLEAR(__pyx_tuple__44);
37863   Py_CLEAR(__pyx_codeobj__45);
37864   Py_CLEAR(__pyx_tuple__46);
37865   Py_CLEAR(__pyx_codeobj__47);
37866   Py_CLEAR(__pyx_tuple__48);
37867   Py_CLEAR(__pyx_codeobj__49);
37868   Py_CLEAR(__pyx_tuple__50);
37869   Py_CLEAR(__pyx_codeobj__51);
37870   Py_CLEAR(__pyx_tuple__52);
37871   Py_CLEAR(__pyx_codeobj__53);
37872   Py_CLEAR(__pyx_tuple__54);
37873   Py_CLEAR(__pyx_codeobj__55);
37874   Py_CLEAR(__pyx_tuple__56);
37875   Py_CLEAR(__pyx_codeobj__57);
37876   Py_CLEAR(__pyx_tuple__58);
37877   Py_CLEAR(__pyx_codeobj__59);
37878   Py_CLEAR(__pyx_tuple__60);
37879   Py_CLEAR(__pyx_codeobj__61);
37880   Py_CLEAR(__pyx_tuple__62);
37881   Py_CLEAR(__pyx_codeobj__63);
37882   Py_CLEAR(__pyx_tuple__64);
37883   Py_CLEAR(__pyx_codeobj__65);
37884   Py_CLEAR(__pyx_tuple__66);
37885   Py_CLEAR(__pyx_codeobj__67);
37886   Py_CLEAR(__pyx_tuple__68);
37887   Py_CLEAR(__pyx_codeobj__69);
37888   Py_CLEAR(__pyx_tuple__70);
37889   Py_CLEAR(__pyx_codeobj__71);
37890   Py_CLEAR(__pyx_tuple__72);
37891   Py_CLEAR(__pyx_tuple__73);
37892   Py_CLEAR(__pyx_codeobj__74);
37893   Py_CLEAR(__pyx_tuple__75);
37894   Py_CLEAR(__pyx_codeobj__76);
37895   Py_CLEAR(__pyx_tuple__77);
37896   Py_CLEAR(__pyx_codeobj__78);
37897   Py_CLEAR(__pyx_tuple__79);
37898   Py_CLEAR(__pyx_codeobj__80);
37899   Py_CLEAR(__pyx_tuple__81);
37900   Py_CLEAR(__pyx_codeobj__82);
37901   Py_CLEAR(__pyx_tuple__83);
37902   Py_CLEAR(__pyx_codeobj__84);
37903   Py_CLEAR(__pyx_tuple__85);
37904   Py_CLEAR(__pyx_codeobj__86);
37905   Py_CLEAR(__pyx_tuple__87);
37906   Py_CLEAR(__pyx_codeobj__88);
37907   Py_CLEAR(__pyx_tuple__89);
37908   Py_CLEAR(__pyx_tuple__90);
37909   Py_CLEAR(__pyx_codeobj__91);
37910   Py_CLEAR(__pyx_tuple__92);
37911   Py_CLEAR(__pyx_codeobj__93);
37912   Py_CLEAR(__pyx_tuple__94);
37913   Py_CLEAR(__pyx_tuple__95);
37914   Py_CLEAR(__pyx_codeobj__96);
37915   Py_CLEAR(__pyx_tuple__97);
37916   Py_CLEAR(__pyx_tuple__98);
37917   Py_CLEAR(__pyx_codeobj__99);
37918   Py_CLEAR(__pyx_tuple__100);
37919   Py_CLEAR(__pyx_tuple__101);
37920   Py_CLEAR(__pyx_codeobj__102);
37921   Py_CLEAR(__pyx_tuple__103);
37922   Py_CLEAR(__pyx_tuple__104);
37923   Py_CLEAR(__pyx_codeobj__105);
37924   Py_CLEAR(__pyx_tuple__106);
37925   Py_CLEAR(__pyx_tuple__107);
37926   Py_CLEAR(__pyx_codeobj__108);
37927   Py_CLEAR(__pyx_tuple__109);
37928   Py_CLEAR(__pyx_codeobj__110);
37929   Py_CLEAR(__pyx_tuple__111);
37930   Py_CLEAR(__pyx_codeobj__112);
37931   Py_CLEAR(__pyx_tuple__113);
37932   /* CodeObjectCache.cleanup */
37933   if (__pyx_code_cache.entries) {
37934       __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
37935       int i, count = __pyx_code_cache.count;
37936       __pyx_code_cache.count = 0;
37937       __pyx_code_cache.max_count = 0;
37938       __pyx_code_cache.entries = NULL;
37939       for (i=0; i<count; i++) {
37940           Py_DECREF(entries[i].code_object);
37941       }
37942       PyMem_Free(entries);
37943   }
37944
37945 Py_CLEAR(__pyx_umethod_PyBytes_Type_split.method);
37946   Py_CLEAR(__pyx_umethod_PyDict_Type_get.method);
37947   Py_CLEAR(__pyx_umethod_PyDict_Type_items.method);
37948   Py_CLEAR(__pyx_umethod_PyDict_Type_values.method);
37949   Py_CLEAR(__pyx_umethod_PyList_Type_remove.method);
37950   Py_CLEAR(__pyx_umethod_PyUnicode_Type_strip.method);
37951 }
37952 static void __pyx_module_cleanup(CYTHON_UNUSED PyObject *self) {
37953   /*--- Global cleanup code ---*/
37954   Py_CLEAR(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
37955   Py_CLEAR(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
37956   Py_CLEAR(__pyx_v_4lxml_9objectify__NO_DEFAULT);
37957   Py_CLEAR(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
37958   Py_CLEAR(__pyx_v_4lxml_9objectify__parse);
37959   Py_CLEAR(__pyx_v_4lxml_9objectify__fromstring);
37960   Py_CLEAR(__pyx_v_4lxml_9objectify_objectify_parser);
37961   Py_CLEAR(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37962   Py_CLEAR(__pyx_v_4lxml_9objectify__cleanup_namespaces);
37963   Py_CLEAR(__pyx_v_4lxml_9objectify__strip_attributes);
37964   Py_CLEAR(__pyx_v_4lxml_9objectify_TREE_PYTYPE);
37965   Py_CLEAR(__pyx_v_4lxml_9objectify__TYPE_CHECKS);
37966   Py_CLEAR(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
37967   Py_CLEAR(__pyx_v_4lxml_9objectify__PYTYPE_DICT);
37968   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
37969   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
37970   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
37971   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
37972   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
37973   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
37974   Py_CLEAR(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
37975   Py_CLEAR(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
37976   Py_CLEAR(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
37977   Py_CLEAR(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
37978   Py_CLEAR(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
37979   Py_CLEAR(__pyx_v_4lxml_9objectify_is_special_method);
37980   Py_CLEAR(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
37981   Py_CLEAR(__pyx_v_4lxml_9objectify_re);
37982   Py_CLEAR(__pyx_v_4lxml_9objectify_etree);
37983   __Pyx_CleanupGlobals();
37984   /*--- Type import cleanup code ---*/
37985   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase);
37986   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup);
37987   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup);
37988   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__Document);
37989   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__Element);
37990   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator);
37991   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher);
37992   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__ElementTree);
37993   /*--- Builtin cleanup code ---*/
37994   Py_CLEAR(__pyx_builtin_ValueError);
37995   Py_CLEAR(__pyx_builtin_TypeError);
37996   Py_CLEAR(__pyx_builtin_object);
37997   Py_CLEAR(__pyx_builtin_IndexError);
37998   Py_CLEAR(__pyx_builtin_AttributeError);
37999   Py_CLEAR(__pyx_builtin_oct);
38000   Py_CLEAR(__pyx_builtin_hex);
38001   Py_CLEAR(__pyx_builtin_enumerate);
38002   Py_CLEAR(__pyx_builtin_map);
38003   Py_CLEAR(__pyx_builtin_MemoryError);
38004   /*--- Intern cleanup code ---*/
38005   Py_CLEAR(__pyx_empty_tuple);
38006   Py_CLEAR(__pyx_d);
38007   Py_CLEAR(__pyx_cython_runtime);
38008   Py_CLEAR(__pyx_b);
38009 }
38010
38011 /* --- Runtime support code --- */
38012 /* Refnanny */
38013 #if CYTHON_REFNANNY
38014 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
38015     PyObject *m = NULL, *p = NULL;
38016     void *r = NULL;
38017     m = PyImport_ImportModule(modname);
38018     if (!m) goto end;
38019     p = PyObject_GetAttrString(m, "RefNannyAPI");
38020     if (!p) goto end;
38021     r = PyLong_AsVoidPtr(p);
38022 end:
38023     Py_XDECREF(p);
38024     Py_XDECREF(m);
38025     return (__Pyx_RefNannyAPIStruct *)r;
38026 }
38027 #endif
38028
38029 /* PyObjectGetAttrStr */
38030 #if CYTHON_USE_TYPE_SLOTS
38031 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
38032     PyTypeObject* tp = Py_TYPE(obj);
38033     if (likely(tp->tp_getattro))
38034         return tp->tp_getattro(obj, attr_name);
38035 #if PY_MAJOR_VERSION < 3
38036     if (likely(tp->tp_getattr))
38037         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
38038 #endif
38039     return PyObject_GetAttr(obj, attr_name);
38040 }
38041 #endif
38042
38043 /* GetBuiltinName */
38044 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
38045     PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
38046     if (unlikely(!result)) {
38047         PyErr_Format(PyExc_NameError,
38048 #if PY_MAJOR_VERSION >= 3
38049             "name '%U' is not defined", name);
38050 #else
38051             "name '%.200s' is not defined", PyString_AS_STRING(name));
38052 #endif
38053     }
38054     return result;
38055 }
38056
38057 /* PyCFunctionFastCall */
38058 #if CYTHON_FAST_PYCCALL
38059 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
38060     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
38061     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
38062     PyObject *self = PyCFunction_GET_SELF(func);
38063     int flags = PyCFunction_GET_FLAGS(func);
38064     assert(PyCFunction_Check(func));
38065     assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
38066     assert(nargs >= 0);
38067     assert(nargs == 0 || args != NULL);
38068     /* _PyCFunction_FastCallDict() must not be called with an exception set,
38069        because it may clear it (directly or indirectly) and so the
38070        caller loses its exception */
38071     assert(!PyErr_Occurred());
38072     if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
38073         return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
38074     } else {
38075         return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
38076     }
38077 }
38078 #endif
38079
38080 /* PyFunctionFastCall */
38081 #if CYTHON_FAST_PYCALL
38082 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
38083                                                PyObject *globals) {
38084     PyFrameObject *f;
38085     PyThreadState *tstate = __Pyx_PyThreadState_Current;
38086     PyObject **fastlocals;
38087     Py_ssize_t i;
38088     PyObject *result;
38089     assert(globals != NULL);
38090     /* XXX Perhaps we should create a specialized
38091        PyFrame_New() that doesn't take locals, but does
38092        take builtins without sanity checking them.
38093        */
38094     assert(tstate != NULL);
38095     f = PyFrame_New(tstate, co, globals, NULL);
38096     if (f == NULL) {
38097         return NULL;
38098     }
38099     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
38100     for (i = 0; i < na; i++) {
38101         Py_INCREF(*args);
38102         fastlocals[i] = *args++;
38103     }
38104     result = PyEval_EvalFrameEx(f,0);
38105     ++tstate->recursion_depth;
38106     Py_DECREF(f);
38107     --tstate->recursion_depth;
38108     return result;
38109 }
38110 #if 1 || PY_VERSION_HEX < 0x030600B1
38111 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
38112     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
38113     PyObject *globals = PyFunction_GET_GLOBALS(func);
38114     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
38115     PyObject *closure;
38116 #if PY_MAJOR_VERSION >= 3
38117     PyObject *kwdefs;
38118 #endif
38119     PyObject *kwtuple, **k;
38120     PyObject **d;
38121     Py_ssize_t nd;
38122     Py_ssize_t nk;
38123     PyObject *result;
38124     assert(kwargs == NULL || PyDict_Check(kwargs));
38125     nk = kwargs ? PyDict_Size(kwargs) : 0;
38126     if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
38127         return NULL;
38128     }
38129     if (
38130 #if PY_MAJOR_VERSION >= 3
38131             co->co_kwonlyargcount == 0 &&
38132 #endif
38133             likely(kwargs == NULL || nk == 0) &&
38134             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
38135         if (argdefs == NULL && co->co_argcount == nargs) {
38136             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
38137             goto done;
38138         }
38139         else if (nargs == 0 && argdefs != NULL
38140                  && co->co_argcount == Py_SIZE(argdefs)) {
38141             /* function called with no arguments, but all parameters have
38142                a default value: use default values as arguments .*/
38143             args = &PyTuple_GET_ITEM(argdefs, 0);
38144             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
38145             goto done;
38146         }
38147     }
38148     if (kwargs != NULL) {
38149         Py_ssize_t pos, i;
38150         kwtuple = PyTuple_New(2 * nk);
38151         if (kwtuple == NULL) {
38152             result = NULL;
38153             goto done;
38154         }
38155         k = &PyTuple_GET_ITEM(kwtuple, 0);
38156         pos = i = 0;
38157         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
38158             Py_INCREF(k[i]);
38159             Py_INCREF(k[i+1]);
38160             i += 2;
38161         }
38162         nk = i / 2;
38163     }
38164     else {
38165         kwtuple = NULL;
38166         k = NULL;
38167     }
38168     closure = PyFunction_GET_CLOSURE(func);
38169 #if PY_MAJOR_VERSION >= 3
38170     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
38171 #endif
38172     if (argdefs != NULL) {
38173         d = &PyTuple_GET_ITEM(argdefs, 0);
38174         nd = Py_SIZE(argdefs);
38175     }
38176     else {
38177         d = NULL;
38178         nd = 0;
38179     }
38180 #if PY_MAJOR_VERSION >= 3
38181     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
38182                                args, (int)nargs,
38183                                k, (int)nk,
38184                                d, (int)nd, kwdefs, closure);
38185 #else
38186     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
38187                                args, (int)nargs,
38188                                k, (int)nk,
38189                                d, (int)nd, closure);
38190 #endif
38191     Py_XDECREF(kwtuple);
38192 done:
38193     Py_LeaveRecursiveCall();
38194     return result;
38195 }
38196 #endif
38197 #endif
38198
38199 /* PyObjectCall */
38200 #if CYTHON_COMPILING_IN_CPYTHON
38201 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
38202     PyObject *result;
38203     ternaryfunc call = func->ob_type->tp_call;
38204     if (unlikely(!call))
38205         return PyObject_Call(func, arg, kw);
38206     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
38207         return NULL;
38208     result = (*call)(func, arg, kw);
38209     Py_LeaveRecursiveCall();
38210     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
38211         PyErr_SetString(
38212             PyExc_SystemError,
38213             "NULL result without error in PyObject_Call");
38214     }
38215     return result;
38216 }
38217 #endif
38218
38219 /* PyObjectCall2Args */
38220 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
38221     PyObject *args, *result = NULL;
38222     #if CYTHON_FAST_PYCALL
38223     if (PyFunction_Check(function)) {
38224         PyObject *args[2] = {arg1, arg2};
38225         return __Pyx_PyFunction_FastCall(function, args, 2);
38226     }
38227     #endif
38228     #if CYTHON_FAST_PYCCALL
38229     if (__Pyx_PyFastCFunction_Check(function)) {
38230         PyObject *args[2] = {arg1, arg2};
38231         return __Pyx_PyCFunction_FastCall(function, args, 2);
38232     }
38233     #endif
38234     args = PyTuple_New(2);
38235     if (unlikely(!args)) goto done;
38236     Py_INCREF(arg1);
38237     PyTuple_SET_ITEM(args, 0, arg1);
38238     Py_INCREF(arg2);
38239     PyTuple_SET_ITEM(args, 1, arg2);
38240     Py_INCREF(function);
38241     result = __Pyx_PyObject_Call(function, args, NULL);
38242     Py_DECREF(args);
38243     Py_DECREF(function);
38244 done:
38245     return result;
38246 }
38247
38248 /* PyObjectCallMethO */
38249 #if CYTHON_COMPILING_IN_CPYTHON
38250 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
38251     PyObject *self, *result;
38252     PyCFunction cfunc;
38253     cfunc = PyCFunction_GET_FUNCTION(func);
38254     self = PyCFunction_GET_SELF(func);
38255     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
38256         return NULL;
38257     result = cfunc(self, arg);
38258     Py_LeaveRecursiveCall();
38259     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
38260         PyErr_SetString(
38261             PyExc_SystemError,
38262             "NULL result without error in PyObject_Call");
38263     }
38264     return result;
38265 }
38266 #endif
38267
38268 /* PyObjectCallOneArg */
38269 #if CYTHON_COMPILING_IN_CPYTHON
38270 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
38271     PyObject *result;
38272     PyObject *args = PyTuple_New(1);
38273     if (unlikely(!args)) return NULL;
38274     Py_INCREF(arg);
38275     PyTuple_SET_ITEM(args, 0, arg);
38276     result = __Pyx_PyObject_Call(func, args, NULL);
38277     Py_DECREF(args);
38278     return result;
38279 }
38280 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
38281 #if CYTHON_FAST_PYCALL
38282     if (PyFunction_Check(func)) {
38283         return __Pyx_PyFunction_FastCall(func, &arg, 1);
38284     }
38285 #endif
38286     if (likely(PyCFunction_Check(func))) {
38287         if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
38288             return __Pyx_PyObject_CallMethO(func, arg);
38289 #if CYTHON_FAST_PYCCALL
38290         } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
38291             return __Pyx_PyCFunction_FastCall(func, &arg, 1);
38292 #endif
38293         }
38294     }
38295     return __Pyx__PyObject_CallOneArg(func, arg);
38296 }
38297 #else
38298 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
38299     PyObject *result;
38300     PyObject *args = PyTuple_Pack(1, arg);
38301     if (unlikely(!args)) return NULL;
38302     result = __Pyx_PyObject_Call(func, args, NULL);
38303     Py_DECREF(args);
38304     return result;
38305 }
38306 #endif
38307
38308 /* RaiseDoubleKeywords */
38309 static void __Pyx_RaiseDoubleKeywordsError(
38310     const char* func_name,
38311     PyObject* kw_name)
38312 {
38313     PyErr_Format(PyExc_TypeError,
38314         #if PY_MAJOR_VERSION >= 3
38315         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
38316         #else
38317         "%s() got multiple values for keyword argument '%s'", func_name,
38318         PyString_AsString(kw_name));
38319         #endif
38320 }
38321
38322 /* ParseKeywords */
38323 static int __Pyx_ParseOptionalKeywords(
38324     PyObject *kwds,
38325     PyObject **argnames[],
38326     PyObject *kwds2,
38327     PyObject *values[],
38328     Py_ssize_t num_pos_args,
38329     const char* function_name)
38330 {
38331     PyObject *key = 0, *value = 0;
38332     Py_ssize_t pos = 0;
38333     PyObject*** name;
38334     PyObject*** first_kw_arg = argnames + num_pos_args;
38335     while (PyDict_Next(kwds, &pos, &key, &value)) {
38336         name = first_kw_arg;
38337         while (*name && (**name != key)) name++;
38338         if (*name) {
38339             values[name-argnames] = value;
38340             continue;
38341         }
38342         name = first_kw_arg;
38343         #if PY_MAJOR_VERSION < 3
38344         if (likely(PyString_Check(key))) {
38345             while (*name) {
38346                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
38347                         && _PyString_Eq(**name, key)) {
38348                     values[name-argnames] = value;
38349                     break;
38350                 }
38351                 name++;
38352             }
38353             if (*name) continue;
38354             else {
38355                 PyObject*** argname = argnames;
38356                 while (argname != first_kw_arg) {
38357                     if ((**argname == key) || (
38358                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
38359                              && _PyString_Eq(**argname, key))) {
38360                         goto arg_passed_twice;
38361                     }
38362                     argname++;
38363                 }
38364             }
38365         } else
38366         #endif
38367         if (likely(PyUnicode_Check(key))) {
38368             while (*name) {
38369                 int cmp = (**name == key) ? 0 :
38370                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
38371                     (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
38372                 #endif
38373                     PyUnicode_Compare(**name, key);
38374                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
38375                 if (cmp == 0) {
38376                     values[name-argnames] = value;
38377                     break;
38378                 }
38379                 name++;
38380             }
38381             if (*name) continue;
38382             else {
38383                 PyObject*** argname = argnames;
38384                 while (argname != first_kw_arg) {
38385                     int cmp = (**argname == key) ? 0 :
38386                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
38387                         (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
38388                     #endif
38389                         PyUnicode_Compare(**argname, key);
38390                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
38391                     if (cmp == 0) goto arg_passed_twice;
38392                     argname++;
38393                 }
38394             }
38395         } else
38396             goto invalid_keyword_type;
38397         if (kwds2) {
38398             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
38399         } else {
38400             goto invalid_keyword;
38401         }
38402     }
38403     return 0;
38404 arg_passed_twice:
38405     __Pyx_RaiseDoubleKeywordsError(function_name, key);
38406     goto bad;
38407 invalid_keyword_type:
38408     PyErr_Format(PyExc_TypeError,
38409         "%.200s() keywords must be strings", function_name);
38410     goto bad;
38411 invalid_keyword:
38412     PyErr_Format(PyExc_TypeError,
38413     #if PY_MAJOR_VERSION < 3
38414         "%.200s() got an unexpected keyword argument '%.200s'",
38415         function_name, PyString_AsString(key));
38416     #else
38417         "%s() got an unexpected keyword argument '%U'",
38418         function_name, key);
38419     #endif
38420 bad:
38421     return -1;
38422 }
38423
38424 /* RaiseArgTupleInvalid */
38425 static void __Pyx_RaiseArgtupleInvalid(
38426     const char* func_name,
38427     int exact,
38428     Py_ssize_t num_min,
38429     Py_ssize_t num_max,
38430     Py_ssize_t num_found)
38431 {
38432     Py_ssize_t num_expected;
38433     const char *more_or_less;
38434     if (num_found < num_min) {
38435         num_expected = num_min;
38436         more_or_less = "at least";
38437     } else {
38438         num_expected = num_max;
38439         more_or_less = "at most";
38440     }
38441     if (exact) {
38442         more_or_less = "exactly";
38443     }
38444     PyErr_Format(PyExc_TypeError,
38445                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
38446                  func_name, more_or_less, num_expected,
38447                  (num_expected == 1) ? "" : "s", num_found);
38448 }
38449
38450 /* RaiseTooManyValuesToUnpack */
38451 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
38452     PyErr_Format(PyExc_ValueError,
38453                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
38454 }
38455
38456 /* RaiseNeedMoreValuesToUnpack */
38457 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
38458     PyErr_Format(PyExc_ValueError,
38459                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
38460                  index, (index == 1) ? "" : "s");
38461 }
38462
38463 /* RaiseNoneIterError */
38464 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
38465     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
38466 }
38467
38468 /* decode_c_bytes */
38469 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
38470          const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
38471          const char* encoding, const char* errors,
38472          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
38473     if (unlikely((start < 0) | (stop < 0))) {
38474         if (start < 0) {
38475             start += length;
38476             if (start < 0)
38477                 start = 0;
38478         }
38479         if (stop < 0)
38480             stop += length;
38481     }
38482     if (stop > length)
38483         stop = length;
38484     if (unlikely(stop <= start))
38485         return __Pyx_NewRef(__pyx_empty_unicode);
38486     length = stop - start;
38487     cstring += start;
38488     if (decode_func) {
38489         return decode_func(cstring, length, errors);
38490     } else {
38491         return PyUnicode_Decode(cstring, length, encoding, errors);
38492     }
38493 }
38494
38495 /* PyObjectCallNoArg */
38496 #if CYTHON_COMPILING_IN_CPYTHON
38497 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
38498 #if CYTHON_FAST_PYCALL
38499     if (PyFunction_Check(func)) {
38500         return __Pyx_PyFunction_FastCall(func, NULL, 0);
38501     }
38502 #endif
38503 #ifdef __Pyx_CyFunction_USED
38504     if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
38505 #else
38506     if (likely(PyCFunction_Check(func)))
38507 #endif
38508     {
38509         if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
38510             return __Pyx_PyObject_CallMethO(func, NULL);
38511         }
38512     }
38513     return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
38514 }
38515 #endif
38516
38517 /* PyDictVersioning */
38518 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
38519 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
38520     PyObject *dict = Py_TYPE(obj)->tp_dict;
38521     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
38522 }
38523 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
38524     PyObject **dictptr = NULL;
38525     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
38526     if (offset) {
38527 #if CYTHON_COMPILING_IN_CPYTHON
38528         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
38529 #else
38530         dictptr = _PyObject_GetDictPtr(obj);
38531 #endif
38532     }
38533     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
38534 }
38535 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
38536     PyObject *dict = Py_TYPE(obj)->tp_dict;
38537     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
38538         return 0;
38539     return obj_dict_version == __Pyx_get_object_dict_version(obj);
38540 }
38541 #endif
38542
38543 /* GetModuleGlobalName */
38544 #if CYTHON_USE_DICT_VERSIONS
38545 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
38546 #else
38547 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
38548 #endif
38549 {
38550     PyObject *result;
38551 #if !CYTHON_AVOID_BORROWED_REFS
38552 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
38553     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
38554     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
38555     if (likely(result)) {
38556         return __Pyx_NewRef(result);
38557     } else if (unlikely(PyErr_Occurred())) {
38558         return NULL;
38559     }
38560 #else
38561     result = PyDict_GetItem(__pyx_d, name);
38562     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
38563     if (likely(result)) {
38564         return __Pyx_NewRef(result);
38565     }
38566 #endif
38567 #else
38568     result = PyObject_GetItem(__pyx_d, name);
38569     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
38570     if (likely(result)) {
38571         return __Pyx_NewRef(result);
38572     }
38573     PyErr_Clear();
38574 #endif
38575     return __Pyx_GetBuiltinName(name);
38576 }
38577
38578 /* ExtTypeTest */
38579 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
38580     if (unlikely(!type)) {
38581         PyErr_SetString(PyExc_SystemError, "Missing type object");
38582         return 0;
38583     }
38584     if (likely(__Pyx_TypeCheck(obj, type)))
38585         return 1;
38586     PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
38587                  Py_TYPE(obj)->tp_name, type->tp_name);
38588     return 0;
38589 }
38590
38591 /* BytesEquals */
38592 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
38593 #if CYTHON_COMPILING_IN_PYPY
38594     return PyObject_RichCompareBool(s1, s2, equals);
38595 #else
38596     if (s1 == s2) {
38597         return (equals == Py_EQ);
38598     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
38599         const char *ps1, *ps2;
38600         Py_ssize_t length = PyBytes_GET_SIZE(s1);
38601         if (length != PyBytes_GET_SIZE(s2))
38602             return (equals == Py_NE);
38603         ps1 = PyBytes_AS_STRING(s1);
38604         ps2 = PyBytes_AS_STRING(s2);
38605         if (ps1[0] != ps2[0]) {
38606             return (equals == Py_NE);
38607         } else if (length == 1) {
38608             return (equals == Py_EQ);
38609         } else {
38610             int result;
38611 #if CYTHON_USE_UNICODE_INTERNALS
38612             Py_hash_t hash1, hash2;
38613             hash1 = ((PyBytesObject*)s1)->ob_shash;
38614             hash2 = ((PyBytesObject*)s2)->ob_shash;
38615             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
38616                 return (equals == Py_NE);
38617             }
38618 #endif
38619             result = memcmp(ps1, ps2, (size_t)length);
38620             return (equals == Py_EQ) ? (result == 0) : (result != 0);
38621         }
38622     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
38623         return (equals == Py_NE);
38624     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
38625         return (equals == Py_NE);
38626     } else {
38627         int result;
38628         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
38629         if (!py_result)
38630             return -1;
38631         result = __Pyx_PyObject_IsTrue(py_result);
38632         Py_DECREF(py_result);
38633         return result;
38634     }
38635 #endif
38636 }
38637
38638 /* UnicodeEquals */
38639 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
38640 #if CYTHON_COMPILING_IN_PYPY
38641     return PyObject_RichCompareBool(s1, s2, equals);
38642 #else
38643 #if PY_MAJOR_VERSION < 3
38644     PyObject* owned_ref = NULL;
38645 #endif
38646     int s1_is_unicode, s2_is_unicode;
38647     if (s1 == s2) {
38648         goto return_eq;
38649     }
38650     s1_is_unicode = PyUnicode_CheckExact(s1);
38651     s2_is_unicode = PyUnicode_CheckExact(s2);
38652 #if PY_MAJOR_VERSION < 3
38653     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
38654         owned_ref = PyUnicode_FromObject(s2);
38655         if (unlikely(!owned_ref))
38656             return -1;
38657         s2 = owned_ref;
38658         s2_is_unicode = 1;
38659     } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
38660         owned_ref = PyUnicode_FromObject(s1);
38661         if (unlikely(!owned_ref))
38662             return -1;
38663         s1 = owned_ref;
38664         s1_is_unicode = 1;
38665     } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
38666         return __Pyx_PyBytes_Equals(s1, s2, equals);
38667     }
38668 #endif
38669     if (s1_is_unicode & s2_is_unicode) {
38670         Py_ssize_t length;
38671         int kind;
38672         void *data1, *data2;
38673         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
38674             return -1;
38675         length = __Pyx_PyUnicode_GET_LENGTH(s1);
38676         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
38677             goto return_ne;
38678         }
38679 #if CYTHON_USE_UNICODE_INTERNALS
38680         {
38681             Py_hash_t hash1, hash2;
38682         #if CYTHON_PEP393_ENABLED
38683             hash1 = ((PyASCIIObject*)s1)->hash;
38684             hash2 = ((PyASCIIObject*)s2)->hash;
38685         #else
38686             hash1 = ((PyUnicodeObject*)s1)->hash;
38687             hash2 = ((PyUnicodeObject*)s2)->hash;
38688         #endif
38689             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
38690                 goto return_ne;
38691             }
38692         }
38693 #endif
38694         kind = __Pyx_PyUnicode_KIND(s1);
38695         if (kind != __Pyx_PyUnicode_KIND(s2)) {
38696             goto return_ne;
38697         }
38698         data1 = __Pyx_PyUnicode_DATA(s1);
38699         data2 = __Pyx_PyUnicode_DATA(s2);
38700         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
38701             goto return_ne;
38702         } else if (length == 1) {
38703             goto return_eq;
38704         } else {
38705             int result = memcmp(data1, data2, (size_t)(length * kind));
38706             #if PY_MAJOR_VERSION < 3
38707             Py_XDECREF(owned_ref);
38708             #endif
38709             return (equals == Py_EQ) ? (result == 0) : (result != 0);
38710         }
38711     } else if ((s1 == Py_None) & s2_is_unicode) {
38712         goto return_ne;
38713     } else if ((s2 == Py_None) & s1_is_unicode) {
38714         goto return_ne;
38715     } else {
38716         int result;
38717         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
38718         #if PY_MAJOR_VERSION < 3
38719         Py_XDECREF(owned_ref);
38720         #endif
38721         if (!py_result)
38722             return -1;
38723         result = __Pyx_PyObject_IsTrue(py_result);
38724         Py_DECREF(py_result);
38725         return result;
38726     }
38727 return_eq:
38728     #if PY_MAJOR_VERSION < 3
38729     Py_XDECREF(owned_ref);
38730     #endif
38731     return (equals == Py_EQ);
38732 return_ne:
38733     #if PY_MAJOR_VERSION < 3
38734     Py_XDECREF(owned_ref);
38735     #endif
38736     return (equals == Py_NE);
38737 #endif
38738 }
38739
38740 /* JoinPyUnicode */
38741 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
38742                                       CYTHON_UNUSED Py_UCS4 max_char) {
38743 #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38744     PyObject *result_uval;
38745     int result_ukind;
38746     Py_ssize_t i, char_pos;
38747     void *result_udata;
38748 #if CYTHON_PEP393_ENABLED
38749     result_uval = PyUnicode_New(result_ulength, max_char);
38750     if (unlikely(!result_uval)) return NULL;
38751     result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
38752     result_udata = PyUnicode_DATA(result_uval);
38753 #else
38754     result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
38755     if (unlikely(!result_uval)) return NULL;
38756     result_ukind = sizeof(Py_UNICODE);
38757     result_udata = PyUnicode_AS_UNICODE(result_uval);
38758 #endif
38759     char_pos = 0;
38760     for (i=0; i < value_count; i++) {
38761         int ukind;
38762         Py_ssize_t ulength;
38763         void *udata;
38764         PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
38765         if (unlikely(__Pyx_PyUnicode_READY(uval)))
38766             goto bad;
38767         ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
38768         if (unlikely(!ulength))
38769             continue;
38770         if (unlikely(char_pos + ulength < 0))
38771             goto overflow;
38772         ukind = __Pyx_PyUnicode_KIND(uval);
38773         udata = __Pyx_PyUnicode_DATA(uval);
38774         if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
38775             memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
38776         } else {
38777             #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
38778             _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
38779             #else
38780             Py_ssize_t j;
38781             for (j=0; j < ulength; j++) {
38782                 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
38783                 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
38784             }
38785             #endif
38786         }
38787         char_pos += ulength;
38788     }
38789     return result_uval;
38790 overflow:
38791     PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
38792 bad:
38793     Py_DECREF(result_uval);
38794     return NULL;
38795 #else
38796     result_ulength++;
38797     value_count++;
38798     return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
38799 #endif
38800 }
38801
38802 /* PyErrFetchRestore */
38803 #if CYTHON_FAST_THREAD_STATE
38804 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
38805     PyObject *tmp_type, *tmp_value, *tmp_tb;
38806     tmp_type = tstate->curexc_type;
38807     tmp_value = tstate->curexc_value;
38808     tmp_tb = tstate->curexc_traceback;
38809     tstate->curexc_type = type;
38810     tstate->curexc_value = value;
38811     tstate->curexc_traceback = tb;
38812     Py_XDECREF(tmp_type);
38813     Py_XDECREF(tmp_value);
38814     Py_XDECREF(tmp_tb);
38815 }
38816 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
38817     *type = tstate->curexc_type;
38818     *value = tstate->curexc_value;
38819     *tb = tstate->curexc_traceback;
38820     tstate->curexc_type = 0;
38821     tstate->curexc_value = 0;
38822     tstate->curexc_traceback = 0;
38823 }
38824 #endif
38825
38826 /* RaiseException */
38827 #if PY_MAJOR_VERSION < 3
38828 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
38829                         CYTHON_UNUSED PyObject *cause) {
38830     __Pyx_PyThreadState_declare
38831     Py_XINCREF(type);
38832     if (!value || value == Py_None)
38833         value = NULL;
38834     else
38835         Py_INCREF(value);
38836     if (!tb || tb == Py_None)
38837         tb = NULL;
38838     else {
38839         Py_INCREF(tb);
38840         if (!PyTraceBack_Check(tb)) {
38841             PyErr_SetString(PyExc_TypeError,
38842                 "raise: arg 3 must be a traceback or None");
38843             goto raise_error;
38844         }
38845     }
38846     if (PyType_Check(type)) {
38847 #if CYTHON_COMPILING_IN_PYPY
38848         if (!value) {
38849             Py_INCREF(Py_None);
38850             value = Py_None;
38851         }
38852 #endif
38853         PyErr_NormalizeException(&type, &value, &tb);
38854     } else {
38855         if (value) {
38856             PyErr_SetString(PyExc_TypeError,
38857                 "instance exception may not have a separate value");
38858             goto raise_error;
38859         }
38860         value = type;
38861         type = (PyObject*) Py_TYPE(type);
38862         Py_INCREF(type);
38863         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
38864             PyErr_SetString(PyExc_TypeError,
38865                 "raise: exception class must be a subclass of BaseException");
38866             goto raise_error;
38867         }
38868     }
38869     __Pyx_PyThreadState_assign
38870     __Pyx_ErrRestore(type, value, tb);
38871     return;
38872 raise_error:
38873     Py_XDECREF(value);
38874     Py_XDECREF(type);
38875     Py_XDECREF(tb);
38876     return;
38877 }
38878 #else
38879 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
38880     PyObject* owned_instance = NULL;
38881     if (tb == Py_None) {
38882         tb = 0;
38883     } else if (tb && !PyTraceBack_Check(tb)) {
38884         PyErr_SetString(PyExc_TypeError,
38885             "raise: arg 3 must be a traceback or None");
38886         goto bad;
38887     }
38888     if (value == Py_None)
38889         value = 0;
38890     if (PyExceptionInstance_Check(type)) {
38891         if (value) {
38892             PyErr_SetString(PyExc_TypeError,
38893                 "instance exception may not have a separate value");
38894             goto bad;
38895         }
38896         value = type;
38897         type = (PyObject*) Py_TYPE(value);
38898     } else if (PyExceptionClass_Check(type)) {
38899         PyObject *instance_class = NULL;
38900         if (value && PyExceptionInstance_Check(value)) {
38901             instance_class = (PyObject*) Py_TYPE(value);
38902             if (instance_class != type) {
38903                 int is_subclass = PyObject_IsSubclass(instance_class, type);
38904                 if (!is_subclass) {
38905                     instance_class = NULL;
38906                 } else if (unlikely(is_subclass == -1)) {
38907                     goto bad;
38908                 } else {
38909                     type = instance_class;
38910                 }
38911             }
38912         }
38913         if (!instance_class) {
38914             PyObject *args;
38915             if (!value)
38916                 args = PyTuple_New(0);
38917             else if (PyTuple_Check(value)) {
38918                 Py_INCREF(value);
38919                 args = value;
38920             } else
38921                 args = PyTuple_Pack(1, value);
38922             if (!args)
38923                 goto bad;
38924             owned_instance = PyObject_Call(type, args, NULL);
38925             Py_DECREF(args);
38926             if (!owned_instance)
38927                 goto bad;
38928             value = owned_instance;
38929             if (!PyExceptionInstance_Check(value)) {
38930                 PyErr_Format(PyExc_TypeError,
38931                              "calling %R should have returned an instance of "
38932                              "BaseException, not %R",
38933                              type, Py_TYPE(value));
38934                 goto bad;
38935             }
38936         }
38937     } else {
38938         PyErr_SetString(PyExc_TypeError,
38939             "raise: exception class must be a subclass of BaseException");
38940         goto bad;
38941     }
38942     if (cause) {
38943         PyObject *fixed_cause;
38944         if (cause == Py_None) {
38945             fixed_cause = NULL;
38946         } else if (PyExceptionClass_Check(cause)) {
38947             fixed_cause = PyObject_CallObject(cause, NULL);
38948             if (fixed_cause == NULL)
38949                 goto bad;
38950         } else if (PyExceptionInstance_Check(cause)) {
38951             fixed_cause = cause;
38952             Py_INCREF(fixed_cause);
38953         } else {
38954             PyErr_SetString(PyExc_TypeError,
38955                             "exception causes must derive from "
38956                             "BaseException");
38957             goto bad;
38958         }
38959         PyException_SetCause(value, fixed_cause);
38960     }
38961     PyErr_SetObject(type, value);
38962     if (tb) {
38963 #if CYTHON_COMPILING_IN_PYPY
38964         PyObject *tmp_type, *tmp_value, *tmp_tb;
38965         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
38966         Py_INCREF(tb);
38967         PyErr_Restore(tmp_type, tmp_value, tb);
38968         Py_XDECREF(tmp_tb);
38969 #else
38970         PyThreadState *tstate = __Pyx_PyThreadState_Current;
38971         PyObject* tmp_tb = tstate->curexc_traceback;
38972         if (tb != tmp_tb) {
38973             Py_INCREF(tb);
38974             tstate->curexc_traceback = tb;
38975             Py_XDECREF(tmp_tb);
38976         }
38977 #endif
38978     }
38979 bad:
38980     Py_XDECREF(owned_instance);
38981     return;
38982 }
38983 #endif
38984
38985 /* GetItemInt */
38986 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
38987     PyObject *r;
38988     if (!j) return NULL;
38989     r = PyObject_GetItem(o, j);
38990     Py_DECREF(j);
38991     return r;
38992 }
38993 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
38994                                                               CYTHON_NCP_UNUSED int wraparound,
38995                                                               CYTHON_NCP_UNUSED int boundscheck) {
38996 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38997     Py_ssize_t wrapped_i = i;
38998     if (wraparound & unlikely(i < 0)) {
38999         wrapped_i += PyList_GET_SIZE(o);
39000     }
39001     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
39002         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
39003         Py_INCREF(r);
39004         return r;
39005     }
39006     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
39007 #else
39008     return PySequence_GetItem(o, i);
39009 #endif
39010 }
39011 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
39012                                                               CYTHON_NCP_UNUSED int wraparound,
39013                                                               CYTHON_NCP_UNUSED int boundscheck) {
39014 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
39015     Py_ssize_t wrapped_i = i;
39016     if (wraparound & unlikely(i < 0)) {
39017         wrapped_i += PyTuple_GET_SIZE(o);
39018     }
39019     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
39020         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
39021         Py_INCREF(r);
39022         return r;
39023     }
39024     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
39025 #else
39026     return PySequence_GetItem(o, i);
39027 #endif
39028 }
39029 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
39030                                                      CYTHON_NCP_UNUSED int wraparound,
39031                                                      CYTHON_NCP_UNUSED int boundscheck) {
39032 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
39033     if (is_list || PyList_CheckExact(o)) {
39034         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
39035         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
39036             PyObject *r = PyList_GET_ITEM(o, n);
39037             Py_INCREF(r);
39038             return r;
39039         }
39040     }
39041     else if (PyTuple_CheckExact(o)) {
39042         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
39043         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
39044             PyObject *r = PyTuple_GET_ITEM(o, n);
39045             Py_INCREF(r);
39046             return r;
39047         }
39048     } else {
39049         PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
39050         if (likely(m && m->sq_item)) {
39051             if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
39052                 Py_ssize_t l = m->sq_length(o);
39053                 if (likely(l >= 0)) {
39054                     i += l;
39055                 } else {
39056                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
39057                         return NULL;
39058                     PyErr_Clear();
39059                 }
39060             }
39061             return m->sq_item(o, i);
39062         }
39063     }
39064 #else
39065     if (is_list || PySequence_Check(o)) {
39066         return PySequence_GetItem(o, i);
39067     }
39068 #endif
39069     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
39070 }
39071
39072 /* ObjectGetItem */
39073 #if CYTHON_USE_TYPE_SLOTS
39074 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
39075     PyObject *runerr;
39076     Py_ssize_t key_value;
39077     PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
39078     if (unlikely(!(m && m->sq_item))) {
39079         PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
39080         return NULL;
39081     }
39082     key_value = __Pyx_PyIndex_AsSsize_t(index);
39083     if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
39084         return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
39085     }
39086     if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
39087         PyErr_Clear();
39088         PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
39089     }
39090     return NULL;
39091 }
39092 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
39093     PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
39094     if (likely(m && m->mp_subscript)) {
39095         return m->mp_subscript(obj, key);
39096     }
39097     return __Pyx_PyObject_GetIndex(obj, key);
39098 }
39099 #endif
39100
39101 /* PyObjectSetAttrStr */
39102 #if CYTHON_USE_TYPE_SLOTS
39103 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
39104     PyTypeObject* tp = Py_TYPE(obj);
39105     if (likely(tp->tp_setattro))
39106         return tp->tp_setattro(obj, attr_name, value);
39107 #if PY_MAJOR_VERSION < 3
39108     if (likely(tp->tp_setattr))
39109         return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
39110 #endif
39111     return PyObject_SetAttr(obj, attr_name, value);
39112 }
39113 #endif
39114
39115 /* SliceObject */
39116 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
39117         Py_ssize_t cstart, Py_ssize_t cstop,
39118         PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
39119         int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
39120 #if CYTHON_USE_TYPE_SLOTS
39121     PyMappingMethods* mp;
39122 #if PY_MAJOR_VERSION < 3
39123     PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
39124     if (likely(ms && ms->sq_ass_slice)) {
39125         if (!has_cstart) {
39126             if (_py_start && (*_py_start != Py_None)) {
39127                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
39128                 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
39129             } else
39130                 cstart = 0;
39131         }
39132         if (!has_cstop) {
39133             if (_py_stop && (*_py_stop != Py_None)) {
39134                 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
39135                 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
39136             } else
39137                 cstop = PY_SSIZE_T_MAX;
39138         }
39139         if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
39140             Py_ssize_t l = ms->sq_length(obj);
39141             if (likely(l >= 0)) {
39142                 if (cstop < 0) {
39143                     cstop += l;
39144                     if (cstop < 0) cstop = 0;
39145                 }
39146                 if (cstart < 0) {
39147                     cstart += l;
39148                     if (cstart < 0) cstart = 0;
39149                 }
39150             } else {
39151                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
39152                     goto bad;
39153                 PyErr_Clear();
39154             }
39155         }
39156         return ms->sq_ass_slice(obj, cstart, cstop, value);
39157     }
39158 #endif
39159     mp = Py_TYPE(obj)->tp_as_mapping;
39160     if (likely(mp && mp->mp_ass_subscript))
39161 #endif
39162     {
39163         int result;
39164         PyObject *py_slice, *py_start, *py_stop;
39165         if (_py_slice) {
39166             py_slice = *_py_slice;
39167         } else {
39168             PyObject* owned_start = NULL;
39169             PyObject* owned_stop = NULL;
39170             if (_py_start) {
39171                 py_start = *_py_start;
39172             } else {
39173                 if (has_cstart) {
39174                     owned_start = py_start = PyInt_FromSsize_t(cstart);
39175                     if (unlikely(!py_start)) goto bad;
39176                 } else
39177                     py_start = Py_None;
39178             }
39179             if (_py_stop) {
39180                 py_stop = *_py_stop;
39181             } else {
39182                 if (has_cstop) {
39183                     owned_stop = py_stop = PyInt_FromSsize_t(cstop);
39184                     if (unlikely(!py_stop)) {
39185                         Py_XDECREF(owned_start);
39186                         goto bad;
39187                     }
39188                 } else
39189                     py_stop = Py_None;
39190             }
39191             py_slice = PySlice_New(py_start, py_stop, Py_None);
39192             Py_XDECREF(owned_start);
39193             Py_XDECREF(owned_stop);
39194             if (unlikely(!py_slice)) goto bad;
39195         }
39196 #if CYTHON_USE_TYPE_SLOTS
39197         result = mp->mp_ass_subscript(obj, py_slice, value);
39198 #else
39199         result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
39200 #endif
39201         if (!_py_slice) {
39202             Py_DECREF(py_slice);
39203         }
39204         return result;
39205     }
39206     PyErr_Format(PyExc_TypeError,
39207         "'%.200s' object does not support slice %.10s",
39208         Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
39209 bad:
39210     return -1;
39211 }
39212
39213 /* UnpackUnboundCMethod */
39214 static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
39215     PyObject *method;
39216     method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
39217     if (unlikely(!method))
39218         return -1;
39219     target->method = method;
39220 #if CYTHON_COMPILING_IN_CPYTHON
39221     #if PY_MAJOR_VERSION >= 3
39222     if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
39223     #endif
39224     {
39225         PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
39226         target->func = descr->d_method->ml_meth;
39227         target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
39228     }
39229 #endif
39230     return 0;
39231 }
39232
39233 /* CallUnboundCMethod1 */
39234 #if CYTHON_COMPILING_IN_CPYTHON
39235 static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
39236     if (likely(cfunc->func)) {
39237         int flag = cfunc->flag;
39238         if (flag == METH_O) {
39239             return (*(cfunc->func))(self, arg);
39240         } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
39241             if (PY_VERSION_HEX >= 0x030700A0) {
39242                 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
39243             } else {
39244                 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
39245             }
39246         } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
39247             return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
39248         }
39249     }
39250     return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
39251 }
39252 #endif
39253 static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
39254     PyObject *args, *result = NULL;
39255     if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
39256 #if CYTHON_COMPILING_IN_CPYTHON
39257     if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
39258         args = PyTuple_New(1);
39259         if (unlikely(!args)) goto bad;
39260         Py_INCREF(arg);
39261         PyTuple_SET_ITEM(args, 0, arg);
39262         if (cfunc->flag & METH_KEYWORDS)
39263             result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
39264         else
39265             result = (*cfunc->func)(self, args);
39266     } else {
39267         args = PyTuple_New(2);
39268         if (unlikely(!args)) goto bad;
39269         Py_INCREF(self);
39270         PyTuple_SET_ITEM(args, 0, self);
39271         Py_INCREF(arg);
39272         PyTuple_SET_ITEM(args, 1, arg);
39273         result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
39274     }
39275 #else
39276     args = PyTuple_Pack(2, self, arg);
39277     if (unlikely(!args)) goto bad;
39278     result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
39279 #endif
39280 bad:
39281     Py_XDECREF(args);
39282     return result;
39283 }
39284
39285 /* CallUnboundCMethod2 */
39286 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
39287 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
39288     if (likely(cfunc->func)) {
39289         PyObject *args[2] = {arg1, arg2};
39290         if (cfunc->flag == METH_FASTCALL) {
39291             #if PY_VERSION_HEX >= 0x030700A0
39292             return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
39293             #else
39294             return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
39295             #endif
39296         }
39297         #if PY_VERSION_HEX >= 0x030700A0
39298         if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
39299             return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
39300         #endif
39301     }
39302     return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
39303 }
39304 #endif
39305 static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
39306     PyObject *args, *result = NULL;
39307     if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
39308 #if CYTHON_COMPILING_IN_CPYTHON
39309     if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
39310         args = PyTuple_New(2);
39311         if (unlikely(!args)) goto bad;
39312         Py_INCREF(arg1);
39313         PyTuple_SET_ITEM(args, 0, arg1);
39314         Py_INCREF(arg2);
39315         PyTuple_SET_ITEM(args, 1, arg2);
39316         if (cfunc->flag & METH_KEYWORDS)
39317             result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
39318         else
39319             result = (*cfunc->func)(self, args);
39320     } else {
39321         args = PyTuple_New(3);
39322         if (unlikely(!args)) goto bad;
39323         Py_INCREF(self);
39324         PyTuple_SET_ITEM(args, 0, self);
39325         Py_INCREF(arg1);
39326         PyTuple_SET_ITEM(args, 1, arg1);
39327         Py_INCREF(arg2);
39328         PyTuple_SET_ITEM(args, 2, arg2);
39329         result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
39330     }
39331 #else
39332     args = PyTuple_Pack(3, self, arg1, arg2);
39333     if (unlikely(!args)) goto bad;
39334     result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
39335 #endif
39336 bad:
39337     Py_XDECREF(args);
39338     return result;
39339 }
39340
39341 /* dict_getitem_default */
39342 static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
39343     PyObject* value;
39344 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
39345     value = PyDict_GetItemWithError(d, key);
39346     if (unlikely(!value)) {
39347         if (unlikely(PyErr_Occurred()))
39348             return NULL;
39349         value = default_value;
39350     }
39351     Py_INCREF(value);
39352     if ((1));
39353 #else
39354     if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
39355         value = PyDict_GetItem(d, key);
39356         if (unlikely(!value)) {
39357             value = default_value;
39358         }
39359         Py_INCREF(value);
39360     }
39361 #endif
39362     else {
39363         if (default_value == Py_None)
39364             value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
39365         else
39366             value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
39367     }
39368     return value;
39369 }
39370
39371 /* CIntToDigits */
39372 static const char DIGIT_PAIRS_10[2*10*10+1] = {
39373     "00010203040506070809"
39374     "10111213141516171819"
39375     "20212223242526272829"
39376     "30313233343536373839"
39377     "40414243444546474849"
39378     "50515253545556575859"
39379     "60616263646566676869"
39380     "70717273747576777879"
39381     "80818283848586878889"
39382     "90919293949596979899"
39383 };
39384 static const char DIGIT_PAIRS_8[2*8*8+1] = {
39385     "0001020304050607"
39386     "1011121314151617"
39387     "2021222324252627"
39388     "3031323334353637"
39389     "4041424344454647"
39390     "5051525354555657"
39391     "6061626364656667"
39392     "7071727374757677"
39393 };
39394 static const char DIGITS_HEX[2*16+1] = {
39395     "0123456789abcdef"
39396     "0123456789ABCDEF"
39397 };
39398
39399 /* BuildPyUnicode */
39400 static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
39401                                                 int prepend_sign, char padding_char) {
39402     PyObject *uval;
39403     Py_ssize_t uoffset = ulength - clength;
39404 #if CYTHON_USE_UNICODE_INTERNALS
39405     Py_ssize_t i;
39406 #if CYTHON_PEP393_ENABLED
39407     void *udata;
39408     uval = PyUnicode_New(ulength, 127);
39409     if (unlikely(!uval)) return NULL;
39410     udata = PyUnicode_DATA(uval);
39411 #else
39412     Py_UNICODE *udata;
39413     uval = PyUnicode_FromUnicode(NULL, ulength);
39414     if (unlikely(!uval)) return NULL;
39415     udata = PyUnicode_AS_UNICODE(uval);
39416 #endif
39417     if (uoffset > 0) {
39418         i = 0;
39419         if (prepend_sign) {
39420             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
39421             i++;
39422         }
39423         for (; i < uoffset; i++) {
39424             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
39425         }
39426     }
39427     for (i=0; i < clength; i++) {
39428         __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
39429     }
39430 #else
39431     {
39432         PyObject *sign = NULL, *padding = NULL;
39433         uval = NULL;
39434         if (uoffset > 0) {
39435             prepend_sign = !!prepend_sign;
39436             if (uoffset > prepend_sign) {
39437                 padding = PyUnicode_FromOrdinal(padding_char);
39438                 if (likely(padding) && uoffset > prepend_sign + 1) {
39439                     PyObject *tmp;
39440                     PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign);
39441                     if (unlikely(!repeat)) goto done_or_error;
39442                     tmp = PyNumber_Multiply(padding, repeat);
39443                     Py_DECREF(repeat);
39444                     Py_DECREF(padding);
39445                     padding = tmp;
39446                 }
39447                 if (unlikely(!padding)) goto done_or_error;
39448             }
39449             if (prepend_sign) {
39450                 sign = PyUnicode_FromOrdinal('-');
39451                 if (unlikely(!sign)) goto done_or_error;
39452             }
39453         }
39454         uval = PyUnicode_DecodeASCII(chars, clength, NULL);
39455         if (likely(uval) && padding) {
39456             PyObject *tmp = PyNumber_Add(padding, uval);
39457             Py_DECREF(uval);
39458             uval = tmp;
39459         }
39460         if (likely(uval) && sign) {
39461             PyObject *tmp = PyNumber_Add(sign, uval);
39462             Py_DECREF(uval);
39463             uval = tmp;
39464         }
39465 done_or_error:
39466         Py_XDECREF(padding);
39467         Py_XDECREF(sign);
39468     }
39469 #endif
39470     return uval;
39471 }
39472
39473 /* CIntToPyUnicode */
39474 #ifdef _MSC_VER
39475     #ifndef _MSC_STDINT_H_
39476         #if _MSC_VER < 1300
39477            typedef unsigned short    uint16_t;
39478         #else
39479            typedef unsigned __int16  uint16_t;
39480         #endif
39481     #endif
39482 #else
39483    #include <stdint.h>
39484 #endif
39485 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
39486 #define GCC_DIAGNOSTIC
39487 #endif
39488 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
39489     char digits[sizeof(Py_ssize_t)*3+2];
39490     char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
39491     const char *hex_digits = DIGITS_HEX;
39492     Py_ssize_t length, ulength;
39493     int prepend_sign, last_one_off;
39494     Py_ssize_t remaining;
39495 #ifdef GCC_DIAGNOSTIC
39496 #pragma GCC diagnostic push
39497 #pragma GCC diagnostic ignored "-Wconversion"
39498 #endif
39499     const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
39500 #ifdef GCC_DIAGNOSTIC
39501 #pragma GCC diagnostic pop
39502 #endif
39503     const int is_unsigned = neg_one > const_zero;
39504     if (format_char == 'X') {
39505         hex_digits += 16;
39506         format_char = 'x';
39507     }
39508     remaining = value;
39509     last_one_off = 0;
39510     dpos = end;
39511     do {
39512         int digit_pos;
39513         switch (format_char) {
39514         case 'o':
39515             digit_pos = abs((int)(remaining % (8*8)));
39516             remaining = (Py_ssize_t) (remaining / (8*8));
39517             dpos -= 2;
39518             *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos];
39519             last_one_off = (digit_pos < 8);
39520             break;
39521         case 'd':
39522             digit_pos = abs((int)(remaining % (10*10)));
39523             remaining = (Py_ssize_t) (remaining / (10*10));
39524             dpos -= 2;
39525             *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos];
39526             last_one_off = (digit_pos < 10);
39527             break;
39528         case 'x':
39529             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
39530             remaining = (Py_ssize_t) (remaining / 16);
39531             break;
39532         default:
39533             assert(0);
39534             break;
39535         }
39536     } while (unlikely(remaining != 0));
39537     if (last_one_off) {
39538         assert(*dpos == '0');
39539         dpos++;
39540     }
39541     length = end - dpos;
39542     ulength = length;
39543     prepend_sign = 0;
39544     if (!is_unsigned && value <= neg_one) {
39545         if (padding_char == ' ' || width <= length + 1) {
39546             *(--dpos) = '-';
39547             ++length;
39548         } else {
39549             prepend_sign = 1;
39550         }
39551         ++ulength;
39552     }
39553     if (width > ulength) {
39554         ulength = width;
39555     }
39556     if (ulength == 1) {
39557         return PyUnicode_FromOrdinal(*dpos);
39558     }
39559     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
39560 }
39561
39562 /* PyIntBinop */
39563 #if !CYTHON_COMPILING_IN_PYPY
39564 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
39565     (void)inplace;
39566     (void)zerodivision_check;
39567     #if PY_MAJOR_VERSION < 3
39568     if (likely(PyInt_CheckExact(op1))) {
39569         const long b = intval;
39570         long x;
39571         long a = PyInt_AS_LONG(op1);
39572             x = (long)((unsigned long)a - b);
39573             if (likely((x^a) >= 0 || (x^~b) >= 0))
39574                 return PyInt_FromLong(x);
39575             return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
39576     }
39577     #endif
39578     #if CYTHON_USE_PYLONG_INTERNALS
39579     if (likely(PyLong_CheckExact(op1))) {
39580         const long b = intval;
39581         long a, x;
39582 #ifdef HAVE_LONG_LONG
39583         const PY_LONG_LONG llb = intval;
39584         PY_LONG_LONG lla, llx;
39585 #endif
39586         const digit* digits = ((PyLongObject*)op1)->ob_digit;
39587         const Py_ssize_t size = Py_SIZE(op1);
39588         if (likely(__Pyx_sst_abs(size) <= 1)) {
39589             a = likely(size) ? digits[0] : 0;
39590             if (size == -1) a = -a;
39591         } else {
39592             switch (size) {
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 2:
39605                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39606                         a = (long) (((((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 > 2 * PyLong_SHIFT) {
39610                         lla = (PY_LONG_LONG) (((((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 3:
39627                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39628                         a = (long) (((((((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 > 3 * PyLong_SHIFT) {
39632                         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]));
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                 case 4:
39649                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39650                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39651                         break;
39652 #ifdef HAVE_LONG_LONG
39653                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
39654                         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]));
39655                         goto long_long;
39656 #endif
39657                     }
39658                     CYTHON_FALLTHROUGH;
39659                 default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
39660             }
39661         }
39662                 x = a - b;
39663             return PyLong_FromLong(x);
39664 #ifdef HAVE_LONG_LONG
39665         long_long:
39666                 llx = lla - llb;
39667             return PyLong_FromLongLong(llx);
39668 #endif
39669         
39670         
39671     }
39672     #endif
39673     if (PyFloat_CheckExact(op1)) {
39674         const long b = intval;
39675         double a = PyFloat_AS_DOUBLE(op1);
39676             double result;
39677             PyFPE_START_PROTECT("subtract", return NULL)
39678             result = ((double)a) - (double)b;
39679             PyFPE_END_PROTECT(result)
39680             return PyFloat_FromDouble(result);
39681     }
39682     return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
39683 }
39684 #endif
39685
39686 /* py_abs */
39687 #if CYTHON_USE_PYLONG_INTERNALS
39688 static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
39689     if (likely(Py_SIZE(n) == -1)) {
39690         return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]);
39691     }
39692 #if CYTHON_COMPILING_IN_CPYTHON
39693     {
39694         PyObject *copy = _PyLong_Copy((PyLongObject*)n);
39695         if (likely(copy)) {
39696             __Pyx_SET_SIZE(copy, -Py_SIZE(copy));
39697         }
39698         return copy;
39699     }
39700 #else
39701     return PyNumber_Negative(n);
39702 #endif
39703 }
39704 #endif
39705
39706 /* GetTopmostException */
39707 #if CYTHON_USE_EXC_INFO_STACK
39708 static _PyErr_StackItem *
39709 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
39710 {
39711     _PyErr_StackItem *exc_info = tstate->exc_info;
39712     while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
39713            exc_info->previous_item != NULL)
39714     {
39715         exc_info = exc_info->previous_item;
39716     }
39717     return exc_info;
39718 }
39719 #endif
39720
39721 /* SaveResetException */
39722 #if CYTHON_FAST_THREAD_STATE
39723 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
39724     #if CYTHON_USE_EXC_INFO_STACK
39725     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
39726     *type = exc_info->exc_type;
39727     *value = exc_info->exc_value;
39728     *tb = exc_info->exc_traceback;
39729     #else
39730     *type = tstate->exc_type;
39731     *value = tstate->exc_value;
39732     *tb = tstate->exc_traceback;
39733     #endif
39734     Py_XINCREF(*type);
39735     Py_XINCREF(*value);
39736     Py_XINCREF(*tb);
39737 }
39738 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
39739     PyObject *tmp_type, *tmp_value, *tmp_tb;
39740     #if CYTHON_USE_EXC_INFO_STACK
39741     _PyErr_StackItem *exc_info = tstate->exc_info;
39742     tmp_type = exc_info->exc_type;
39743     tmp_value = exc_info->exc_value;
39744     tmp_tb = exc_info->exc_traceback;
39745     exc_info->exc_type = type;
39746     exc_info->exc_value = value;
39747     exc_info->exc_traceback = tb;
39748     #else
39749     tmp_type = tstate->exc_type;
39750     tmp_value = tstate->exc_value;
39751     tmp_tb = tstate->exc_traceback;
39752     tstate->exc_type = type;
39753     tstate->exc_value = value;
39754     tstate->exc_traceback = tb;
39755     #endif
39756     Py_XDECREF(tmp_type);
39757     Py_XDECREF(tmp_value);
39758     Py_XDECREF(tmp_tb);
39759 }
39760 #endif
39761
39762 /* PyErrExceptionMatches */
39763 #if CYTHON_FAST_THREAD_STATE
39764 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
39765     Py_ssize_t i, n;
39766     n = PyTuple_GET_SIZE(tuple);
39767 #if PY_MAJOR_VERSION >= 3
39768     for (i=0; i<n; i++) {
39769         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
39770     }
39771 #endif
39772     for (i=0; i<n; i++) {
39773         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
39774     }
39775     return 0;
39776 }
39777 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
39778     PyObject *exc_type = tstate->curexc_type;
39779     if (exc_type == err) return 1;
39780     if (unlikely(!exc_type)) return 0;
39781     if (unlikely(PyTuple_Check(err)))
39782         return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
39783     return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
39784 }
39785 #endif
39786
39787 /* GetAttr */
39788 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
39789 #if CYTHON_USE_TYPE_SLOTS
39790 #if PY_MAJOR_VERSION >= 3
39791     if (likely(PyUnicode_Check(n)))
39792 #else
39793     if (likely(PyString_Check(n)))
39794 #endif
39795         return __Pyx_PyObject_GetAttrStr(o, n);
39796 #endif
39797     return PyObject_GetAttr(o, n);
39798 }
39799
39800 /* GetAttr3 */
39801 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
39802     __Pyx_PyThreadState_declare
39803     __Pyx_PyThreadState_assign
39804     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
39805         return NULL;
39806     __Pyx_PyErr_Clear();
39807     Py_INCREF(d);
39808     return d;
39809 }
39810 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
39811     PyObject *r = __Pyx_GetAttr(o, n);
39812     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
39813 }
39814
39815 /* IterFinish */
39816 static CYTHON_INLINE int __Pyx_IterFinish(void) {
39817 #if CYTHON_FAST_THREAD_STATE
39818     PyThreadState *tstate = __Pyx_PyThreadState_Current;
39819     PyObject* exc_type = tstate->curexc_type;
39820     if (unlikely(exc_type)) {
39821         if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
39822             PyObject *exc_value, *exc_tb;
39823             exc_value = tstate->curexc_value;
39824             exc_tb = tstate->curexc_traceback;
39825             tstate->curexc_type = 0;
39826             tstate->curexc_value = 0;
39827             tstate->curexc_traceback = 0;
39828             Py_DECREF(exc_type);
39829             Py_XDECREF(exc_value);
39830             Py_XDECREF(exc_tb);
39831             return 0;
39832         } else {
39833             return -1;
39834         }
39835     }
39836     return 0;
39837 #else
39838     if (unlikely(PyErr_Occurred())) {
39839         if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
39840             PyErr_Clear();
39841             return 0;
39842         } else {
39843             return -1;
39844         }
39845     }
39846     return 0;
39847 #endif
39848 }
39849
39850 /* UnpackItemEndCheck */
39851 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
39852     if (unlikely(retval)) {
39853         Py_DECREF(retval);
39854         __Pyx_RaiseTooManyValuesError(expected);
39855         return -1;
39856     } else {
39857         return __Pyx_IterFinish();
39858     }
39859     return 0;
39860 }
39861
39862 /* PyIntBinop */
39863 #if !CYTHON_COMPILING_IN_PYPY
39864 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
39865     (void)inplace;
39866     (void)zerodivision_check;
39867     #if PY_MAJOR_VERSION < 3
39868     if (likely(PyInt_CheckExact(op1))) {
39869         const long b = intval;
39870         long x;
39871         long a = PyInt_AS_LONG(op1);
39872             x = (long)((unsigned long)a + b);
39873             if (likely((x^a) >= 0 || (x^b) >= 0))
39874                 return PyInt_FromLong(x);
39875             return PyLong_Type.tp_as_number->nb_add(op1, op2);
39876     }
39877     #endif
39878     #if CYTHON_USE_PYLONG_INTERNALS
39879     if (likely(PyLong_CheckExact(op1))) {
39880         const long b = intval;
39881         long a, x;
39882 #ifdef HAVE_LONG_LONG
39883         const PY_LONG_LONG llb = intval;
39884         PY_LONG_LONG lla, llx;
39885 #endif
39886         const digit* digits = ((PyLongObject*)op1)->ob_digit;
39887         const Py_ssize_t size = Py_SIZE(op1);
39888         if (likely(__Pyx_sst_abs(size) <= 1)) {
39889             a = likely(size) ? digits[0] : 0;
39890             if (size == -1) a = -a;
39891         } else {
39892             switch (size) {
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 2:
39905                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39906                         a = (long) (((((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 > 2 * PyLong_SHIFT) {
39910                         lla = (PY_LONG_LONG) (((((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 3:
39927                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39928                         a = (long) (((((((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 > 3 * PyLong_SHIFT) {
39932                         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]));
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                 case 4:
39949                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39950                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39951                         break;
39952 #ifdef HAVE_LONG_LONG
39953                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
39954                         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]));
39955                         goto long_long;
39956 #endif
39957                     }
39958                     CYTHON_FALLTHROUGH;
39959                 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
39960             }
39961         }
39962                 x = a + b;
39963             return PyLong_FromLong(x);
39964 #ifdef HAVE_LONG_LONG
39965         long_long:
39966                 llx = lla + llb;
39967             return PyLong_FromLongLong(llx);
39968 #endif
39969         
39970         
39971     }
39972     #endif
39973     if (PyFloat_CheckExact(op1)) {
39974         const long b = intval;
39975         double a = PyFloat_AS_DOUBLE(op1);
39976             double result;
39977             PyFPE_START_PROTECT("add", return NULL)
39978             result = ((double)a) + (double)b;
39979             PyFPE_END_PROTECT(result)
39980             return PyFloat_FromDouble(result);
39981     }
39982     return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
39983 }
39984 #endif
39985
39986 /* PyIntCompare */
39987 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
39988     if (op1 == op2) {
39989         Py_RETURN_TRUE;
39990     }
39991     #if PY_MAJOR_VERSION < 3
39992     if (likely(PyInt_CheckExact(op1))) {
39993         const long b = intval;
39994         long a = PyInt_AS_LONG(op1);
39995         if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
39996     }
39997     #endif
39998     #if CYTHON_USE_PYLONG_INTERNALS
39999     if (likely(PyLong_CheckExact(op1))) {
40000         int unequal;
40001         unsigned long uintval;
40002         Py_ssize_t size = Py_SIZE(op1);
40003         const digit* digits = ((PyLongObject*)op1)->ob_digit;
40004         if (intval == 0) {
40005             if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40006         } else if (intval < 0) {
40007             if (size >= 0)
40008                 Py_RETURN_FALSE;
40009             intval = -intval;
40010             size = -size;
40011         } else {
40012             if (size <= 0)
40013                 Py_RETURN_FALSE;
40014         }
40015         uintval = (unsigned long) intval;
40016 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
40017         if (uintval >> (PyLong_SHIFT * 4)) {
40018             unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40019                  | (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));
40020         } else
40021 #endif
40022 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
40023         if (uintval >> (PyLong_SHIFT * 3)) {
40024             unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40025                  | (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));
40026         } else
40027 #endif
40028 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
40029         if (uintval >> (PyLong_SHIFT * 2)) {
40030             unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40031                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40032         } else
40033 #endif
40034 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
40035         if (uintval >> (PyLong_SHIFT * 1)) {
40036             unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40037                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40038         } else
40039 #endif
40040             unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
40041         if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40042     }
40043     #endif
40044     if (PyFloat_CheckExact(op1)) {
40045         const long b = intval;
40046         double a = PyFloat_AS_DOUBLE(op1);
40047         if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40048     }
40049     return (
40050         PyObject_RichCompare(op1, op2, Py_EQ));
40051 }
40052
40053 /* CallUnboundCMethod0 */
40054 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
40055     PyObject *args, *result = NULL;
40056     if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
40057 #if CYTHON_ASSUME_SAFE_MACROS
40058     args = PyTuple_New(1);
40059     if (unlikely(!args)) goto bad;
40060     Py_INCREF(self);
40061     PyTuple_SET_ITEM(args, 0, self);
40062 #else
40063     args = PyTuple_Pack(1, self);
40064     if (unlikely(!args)) goto bad;
40065 #endif
40066     result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
40067     Py_DECREF(args);
40068 bad:
40069     return result;
40070 }
40071
40072 /* py_dict_items */
40073 static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
40074     if (PY_MAJOR_VERSION >= 3)
40075         return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
40076     else
40077         return PyDict_Items(d);
40078 }
40079
40080 /* pyfrozenset_new */
40081 static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
40082     if (it) {
40083         PyObject* result;
40084 #if CYTHON_COMPILING_IN_PYPY
40085         PyObject* args;
40086         args = PyTuple_Pack(1, it);
40087         if (unlikely(!args))
40088             return NULL;
40089         result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
40090         Py_DECREF(args);
40091         return result;
40092 #else
40093         if (PyFrozenSet_CheckExact(it)) {
40094             Py_INCREF(it);
40095             return it;
40096         }
40097         result = PyFrozenSet_New(it);
40098         if (unlikely(!result))
40099             return NULL;
40100         if (likely(PySet_GET_SIZE(result)))
40101             return result;
40102         Py_DECREF(result);
40103 #endif
40104     }
40105 #if CYTHON_USE_TYPE_SLOTS
40106     return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
40107 #else
40108     return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
40109 #endif
40110 }
40111
40112 /* PySetContains */
40113 static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
40114     int result = -1;
40115     if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
40116         PyObject *tmpkey;
40117         PyErr_Clear();
40118         tmpkey = __Pyx_PyFrozenSet_New(key);
40119         if (tmpkey != NULL) {
40120             result = PySet_Contains(set, tmpkey);
40121             Py_DECREF(tmpkey);
40122         }
40123     }
40124     return result;
40125 }
40126 static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
40127     int result = PySet_Contains(set, key);
40128     if (unlikely(result < 0)) {
40129         result = __Pyx_PySet_ContainsUnhashable(set, key);
40130     }
40131     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
40132 }
40133
40134 /* py_dict_values */
40135 static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
40136     if (PY_MAJOR_VERSION >= 3)
40137         return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
40138     else
40139         return PyDict_Values(d);
40140 }
40141
40142 /* KeywordStringCheck */
40143 static int __Pyx_CheckKeywordStrings(
40144     PyObject *kwdict,
40145     const char* function_name,
40146     int kw_allowed)
40147 {
40148     PyObject* key = 0;
40149     Py_ssize_t pos = 0;
40150 #if CYTHON_COMPILING_IN_PYPY
40151     if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
40152         goto invalid_keyword;
40153     return 1;
40154 #else
40155     while (PyDict_Next(kwdict, &pos, &key, 0)) {
40156         #if PY_MAJOR_VERSION < 3
40157         if (unlikely(!PyString_Check(key)))
40158         #endif
40159             if (unlikely(!PyUnicode_Check(key)))
40160                 goto invalid_keyword_type;
40161     }
40162     if ((!kw_allowed) && unlikely(key))
40163         goto invalid_keyword;
40164     return 1;
40165 invalid_keyword_type:
40166     PyErr_Format(PyExc_TypeError,
40167         "%.200s() keywords must be strings", function_name);
40168     return 0;
40169 #endif
40170 invalid_keyword:
40171     PyErr_Format(PyExc_TypeError,
40172     #if PY_MAJOR_VERSION < 3
40173         "%.200s() got an unexpected keyword argument '%.200s'",
40174         function_name, PyString_AsString(key));
40175     #else
40176         "%s() got an unexpected keyword argument '%U'",
40177         function_name, key);
40178     #endif
40179     return 0;
40180 }
40181
40182 /* ArgTypeTest */
40183 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
40184 {
40185     if (unlikely(!type)) {
40186         PyErr_SetString(PyExc_SystemError, "Missing type object");
40187         return 0;
40188     }
40189     else if (exact) {
40190         #if PY_MAJOR_VERSION == 2
40191         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
40192         #endif
40193     }
40194     else {
40195         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
40196     }
40197     PyErr_Format(PyExc_TypeError,
40198         "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
40199         name, type->tp_name, Py_TYPE(obj)->tp_name);
40200     return 0;
40201 }
40202
40203 /* PyUnicode_Unicode */
40204 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
40205     if (unlikely(obj == Py_None))
40206         obj = __pyx_n_u_None;
40207     return __Pyx_NewRef(obj);
40208 }
40209
40210 /* PyObjectFormatAndDecref */
40211 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
40212     if (unlikely(!s)) return NULL;
40213     if (likely(PyUnicode_CheckExact(s))) return s;
40214     #if PY_MAJOR_VERSION < 3
40215     if (likely(PyString_CheckExact(s))) {
40216         PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
40217         Py_DECREF(s);
40218         return result;
40219     }
40220     #endif
40221     return __Pyx_PyObject_FormatAndDecref(s, f);
40222 }
40223 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
40224     PyObject *result = PyObject_Format(s, f);
40225     Py_DECREF(s);
40226     return result;
40227 }
40228
40229 /* SliceObject */
40230 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
40231         Py_ssize_t cstart, Py_ssize_t cstop,
40232         PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
40233         int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
40234 #if CYTHON_USE_TYPE_SLOTS
40235     PyMappingMethods* mp;
40236 #if PY_MAJOR_VERSION < 3
40237     PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
40238     if (likely(ms && ms->sq_slice)) {
40239         if (!has_cstart) {
40240             if (_py_start && (*_py_start != Py_None)) {
40241                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
40242                 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
40243             } else
40244                 cstart = 0;
40245         }
40246         if (!has_cstop) {
40247             if (_py_stop && (*_py_stop != Py_None)) {
40248                 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
40249                 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
40250             } else
40251                 cstop = PY_SSIZE_T_MAX;
40252         }
40253         if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
40254             Py_ssize_t l = ms->sq_length(obj);
40255             if (likely(l >= 0)) {
40256                 if (cstop < 0) {
40257                     cstop += l;
40258                     if (cstop < 0) cstop = 0;
40259                 }
40260                 if (cstart < 0) {
40261                     cstart += l;
40262                     if (cstart < 0) cstart = 0;
40263                 }
40264             } else {
40265                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
40266                     goto bad;
40267                 PyErr_Clear();
40268             }
40269         }
40270         return ms->sq_slice(obj, cstart, cstop);
40271     }
40272 #endif
40273     mp = Py_TYPE(obj)->tp_as_mapping;
40274     if (likely(mp && mp->mp_subscript))
40275 #endif
40276     {
40277         PyObject* result;
40278         PyObject *py_slice, *py_start, *py_stop;
40279         if (_py_slice) {
40280             py_slice = *_py_slice;
40281         } else {
40282             PyObject* owned_start = NULL;
40283             PyObject* owned_stop = NULL;
40284             if (_py_start) {
40285                 py_start = *_py_start;
40286             } else {
40287                 if (has_cstart) {
40288                     owned_start = py_start = PyInt_FromSsize_t(cstart);
40289                     if (unlikely(!py_start)) goto bad;
40290                 } else
40291                     py_start = Py_None;
40292             }
40293             if (_py_stop) {
40294                 py_stop = *_py_stop;
40295             } else {
40296                 if (has_cstop) {
40297                     owned_stop = py_stop = PyInt_FromSsize_t(cstop);
40298                     if (unlikely(!py_stop)) {
40299                         Py_XDECREF(owned_start);
40300                         goto bad;
40301                     }
40302                 } else
40303                     py_stop = Py_None;
40304             }
40305             py_slice = PySlice_New(py_start, py_stop, Py_None);
40306             Py_XDECREF(owned_start);
40307             Py_XDECREF(owned_stop);
40308             if (unlikely(!py_slice)) goto bad;
40309         }
40310 #if CYTHON_USE_TYPE_SLOTS
40311         result = mp->mp_subscript(obj, py_slice);
40312 #else
40313         result = PyObject_GetItem(obj, py_slice);
40314 #endif
40315         if (!_py_slice) {
40316             Py_DECREF(py_slice);
40317         }
40318         return result;
40319     }
40320     PyErr_Format(PyExc_TypeError,
40321         "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
40322 bad:
40323     return NULL;
40324 }
40325
40326 /* Import */
40327 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
40328     PyObject *empty_list = 0;
40329     PyObject *module = 0;
40330     PyObject *global_dict = 0;
40331     PyObject *empty_dict = 0;
40332     PyObject *list;
40333     #if PY_MAJOR_VERSION < 3
40334     PyObject *py_import;
40335     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
40336     if (!py_import)
40337         goto bad;
40338     #endif
40339     if (from_list)
40340         list = from_list;
40341     else {
40342         empty_list = PyList_New(0);
40343         if (!empty_list)
40344             goto bad;
40345         list = empty_list;
40346     }
40347     global_dict = PyModule_GetDict(__pyx_m);
40348     if (!global_dict)
40349         goto bad;
40350     empty_dict = PyDict_New();
40351     if (!empty_dict)
40352         goto bad;
40353     {
40354         #if PY_MAJOR_VERSION >= 3
40355         if (level == -1) {
40356             if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
40357                 module = PyImport_ImportModuleLevelObject(
40358                     name, global_dict, empty_dict, list, 1);
40359                 if (!module) {
40360                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
40361                         goto bad;
40362                     PyErr_Clear();
40363                 }
40364             }
40365             level = 0;
40366         }
40367         #endif
40368         if (!module) {
40369             #if PY_MAJOR_VERSION < 3
40370             PyObject *py_level = PyInt_FromLong(level);
40371             if (!py_level)
40372                 goto bad;
40373             module = PyObject_CallFunctionObjArgs(py_import,
40374                 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
40375             Py_DECREF(py_level);
40376             #else
40377             module = PyImport_ImportModuleLevelObject(
40378                 name, global_dict, empty_dict, list, level);
40379             #endif
40380         }
40381     }
40382 bad:
40383     #if PY_MAJOR_VERSION < 3
40384     Py_XDECREF(py_import);
40385     #endif
40386     Py_XDECREF(empty_list);
40387     Py_XDECREF(empty_dict);
40388     return module;
40389 }
40390
40391 /* GetException */
40392 #if CYTHON_FAST_THREAD_STATE
40393 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
40394 #else
40395 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
40396 #endif
40397 {
40398     PyObject *local_type, *local_value, *local_tb;
40399 #if CYTHON_FAST_THREAD_STATE
40400     PyObject *tmp_type, *tmp_value, *tmp_tb;
40401     local_type = tstate->curexc_type;
40402     local_value = tstate->curexc_value;
40403     local_tb = tstate->curexc_traceback;
40404     tstate->curexc_type = 0;
40405     tstate->curexc_value = 0;
40406     tstate->curexc_traceback = 0;
40407 #else
40408     PyErr_Fetch(&local_type, &local_value, &local_tb);
40409 #endif
40410     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
40411 #if CYTHON_FAST_THREAD_STATE
40412     if (unlikely(tstate->curexc_type))
40413 #else
40414     if (unlikely(PyErr_Occurred()))
40415 #endif
40416         goto bad;
40417     #if PY_MAJOR_VERSION >= 3
40418     if (local_tb) {
40419         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
40420             goto bad;
40421     }
40422     #endif
40423     Py_XINCREF(local_tb);
40424     Py_XINCREF(local_type);
40425     Py_XINCREF(local_value);
40426     *type = local_type;
40427     *value = local_value;
40428     *tb = local_tb;
40429 #if CYTHON_FAST_THREAD_STATE
40430     #if CYTHON_USE_EXC_INFO_STACK
40431     {
40432         _PyErr_StackItem *exc_info = tstate->exc_info;
40433         tmp_type = exc_info->exc_type;
40434         tmp_value = exc_info->exc_value;
40435         tmp_tb = exc_info->exc_traceback;
40436         exc_info->exc_type = local_type;
40437         exc_info->exc_value = local_value;
40438         exc_info->exc_traceback = local_tb;
40439     }
40440     #else
40441     tmp_type = tstate->exc_type;
40442     tmp_value = tstate->exc_value;
40443     tmp_tb = tstate->exc_traceback;
40444     tstate->exc_type = local_type;
40445     tstate->exc_value = local_value;
40446     tstate->exc_traceback = local_tb;
40447     #endif
40448     Py_XDECREF(tmp_type);
40449     Py_XDECREF(tmp_value);
40450     Py_XDECREF(tmp_tb);
40451 #else
40452     PyErr_SetExcInfo(local_type, local_value, local_tb);
40453 #endif
40454     return 0;
40455 bad:
40456     *type = 0;
40457     *value = 0;
40458     *tb = 0;
40459     Py_XDECREF(local_type);
40460     Py_XDECREF(local_value);
40461     Py_XDECREF(local_tb);
40462     return -1;
40463 }
40464
40465 /* PyIntCompare */
40466 static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
40467     if (op1 == op2) {
40468         Py_RETURN_FALSE;
40469     }
40470     #if PY_MAJOR_VERSION < 3
40471     if (likely(PyInt_CheckExact(op1))) {
40472         const long b = intval;
40473         long a = PyInt_AS_LONG(op1);
40474         if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40475     }
40476     #endif
40477     #if CYTHON_USE_PYLONG_INTERNALS
40478     if (likely(PyLong_CheckExact(op1))) {
40479         int unequal;
40480         unsigned long uintval;
40481         Py_ssize_t size = Py_SIZE(op1);
40482         const digit* digits = ((PyLongObject*)op1)->ob_digit;
40483         if (intval == 0) {
40484             if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40485         } else if (intval < 0) {
40486             if (size >= 0)
40487                 Py_RETURN_TRUE;
40488             intval = -intval;
40489             size = -size;
40490         } else {
40491             if (size <= 0)
40492                 Py_RETURN_TRUE;
40493         }
40494         uintval = (unsigned long) intval;
40495 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
40496         if (uintval >> (PyLong_SHIFT * 4)) {
40497             unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40498                  | (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));
40499         } else
40500 #endif
40501 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
40502         if (uintval >> (PyLong_SHIFT * 3)) {
40503             unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40504                  | (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));
40505         } else
40506 #endif
40507 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
40508         if (uintval >> (PyLong_SHIFT * 2)) {
40509             unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40510                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40511         } else
40512 #endif
40513 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
40514         if (uintval >> (PyLong_SHIFT * 1)) {
40515             unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40516                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40517         } else
40518 #endif
40519             unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
40520         if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40521     }
40522     #endif
40523     if (PyFloat_CheckExact(op1)) {
40524         const long b = intval;
40525         double a = PyFloat_AS_DOUBLE(op1);
40526         if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40527     }
40528     return (
40529         PyObject_RichCompare(op1, op2, Py_NE));
40530 }
40531
40532 /* DelItemInt */
40533 static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
40534     int r;
40535     if (!j) return -1;
40536     r = PyObject_DelItem(o, j);
40537     Py_DECREF(j);
40538     return r;
40539 }
40540 static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
40541                                                CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
40542 #if !CYTHON_USE_TYPE_SLOTS
40543     if (is_list || PySequence_Check(o)) {
40544         return PySequence_DelItem(o, i);
40545     }
40546 #else
40547     PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
40548     if (likely(m && m->sq_ass_item)) {
40549         if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
40550             Py_ssize_t l = m->sq_length(o);
40551             if (likely(l >= 0)) {
40552                 i += l;
40553             } else {
40554                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
40555                     return -1;
40556                 PyErr_Clear();
40557             }
40558         }
40559         return m->sq_ass_item(o, i, (PyObject *)NULL);
40560     }
40561 #endif
40562     return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
40563 }
40564
40565 /* CallNextTpDealloc */
40566 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
40567     PyTypeObject* type = Py_TYPE(obj);
40568     while (type && type->tp_dealloc != current_tp_dealloc)
40569         type = type->tp_base;
40570     while (type && type->tp_dealloc == current_tp_dealloc)
40571         type = type->tp_base;
40572     if (type)
40573         type->tp_dealloc(obj);
40574 }
40575
40576 /* CallNextTpTraverse */
40577 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
40578     PyTypeObject* type = Py_TYPE(obj);
40579     while (type && type->tp_traverse != current_tp_traverse)
40580         type = type->tp_base;
40581     while (type && type->tp_traverse == current_tp_traverse)
40582         type = type->tp_base;
40583     if (type && type->tp_traverse)
40584         return type->tp_traverse(obj, v, a);
40585     return 0;
40586 }
40587
40588 /* CallNextTpClear */
40589 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
40590     PyTypeObject* type = Py_TYPE(obj);
40591     while (type && type->tp_clear != current_tp_clear)
40592         type = type->tp_base;
40593     while (type && type->tp_clear == current_tp_clear)
40594         type = type->tp_base;
40595     if (type && type->tp_clear)
40596         type->tp_clear(obj);
40597 }
40598
40599 /* PyObject_GenericGetAttrNoDict */
40600 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
40601 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
40602     PyErr_Format(PyExc_AttributeError,
40603 #if PY_MAJOR_VERSION >= 3
40604                  "'%.50s' object has no attribute '%U'",
40605                  tp->tp_name, attr_name);
40606 #else
40607                  "'%.50s' object has no attribute '%.400s'",
40608                  tp->tp_name, PyString_AS_STRING(attr_name));
40609 #endif
40610     return NULL;
40611 }
40612 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
40613     PyObject *descr;
40614     PyTypeObject *tp = Py_TYPE(obj);
40615     if (unlikely(!PyString_Check(attr_name))) {
40616         return PyObject_GenericGetAttr(obj, attr_name);
40617     }
40618     assert(!tp->tp_dictoffset);
40619     descr = _PyType_Lookup(tp, attr_name);
40620     if (unlikely(!descr)) {
40621         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
40622     }
40623     Py_INCREF(descr);
40624     #if PY_MAJOR_VERSION < 3
40625     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
40626     #endif
40627     {
40628         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
40629         if (unlikely(f)) {
40630             PyObject *res = f(descr, obj, (PyObject *)tp);
40631             Py_DECREF(descr);
40632             return res;
40633         }
40634     }
40635     return descr;
40636 }
40637 #endif
40638
40639 /* PyObject_GenericGetAttr */
40640 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
40641 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
40642     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
40643         return PyObject_GenericGetAttr(obj, attr_name);
40644     }
40645     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
40646 }
40647 #endif
40648
40649 /* TypeImport */
40650 #ifndef __PYX_HAVE_RT_ImportType
40651 #define __PYX_HAVE_RT_ImportType
40652 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
40653     size_t size, enum __Pyx_ImportType_CheckSize check_size)
40654 {
40655     PyObject *result = 0;
40656     char warning[200];
40657     Py_ssize_t basicsize;
40658 #ifdef Py_LIMITED_API
40659     PyObject *py_basicsize;
40660 #endif
40661     result = PyObject_GetAttrString(module, class_name);
40662     if (!result)
40663         goto bad;
40664     if (!PyType_Check(result)) {
40665         PyErr_Format(PyExc_TypeError,
40666             "%.200s.%.200s is not a type object",
40667             module_name, class_name);
40668         goto bad;
40669     }
40670 #ifndef Py_LIMITED_API
40671     basicsize = ((PyTypeObject *)result)->tp_basicsize;
40672 #else
40673     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
40674     if (!py_basicsize)
40675         goto bad;
40676     basicsize = PyLong_AsSsize_t(py_basicsize);
40677     Py_DECREF(py_basicsize);
40678     py_basicsize = 0;
40679     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
40680         goto bad;
40681 #endif
40682     if ((size_t)basicsize < size) {
40683         PyErr_Format(PyExc_ValueError,
40684             "%.200s.%.200s size changed, may indicate binary incompatibility. "
40685             "Expected %zd from C header, got %zd from PyObject",
40686             module_name, class_name, size, basicsize);
40687         goto bad;
40688     }
40689     if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
40690         PyErr_Format(PyExc_ValueError,
40691             "%.200s.%.200s size changed, may indicate binary incompatibility. "
40692             "Expected %zd from C header, got %zd from PyObject",
40693             module_name, class_name, size, basicsize);
40694         goto bad;
40695     }
40696     else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
40697         PyOS_snprintf(warning, sizeof(warning),
40698             "%s.%s size changed, may indicate binary incompatibility. "
40699             "Expected %zd from C header, got %zd from PyObject",
40700             module_name, class_name, size, basicsize);
40701         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
40702     }
40703     return (PyTypeObject *)result;
40704 bad:
40705     Py_XDECREF(result);
40706     return NULL;
40707 }
40708 #endif
40709
40710 /* SetVTable */
40711 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
40712 #if PY_VERSION_HEX >= 0x02070000
40713     PyObject *ob = PyCapsule_New(vtable, 0, 0);
40714 #else
40715     PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
40716 #endif
40717     if (!ob)
40718         goto bad;
40719     if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
40720         goto bad;
40721     Py_DECREF(ob);
40722     return 0;
40723 bad:
40724     Py_XDECREF(ob);
40725     return -1;
40726 }
40727
40728 /* ImportFrom */
40729 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
40730     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
40731     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
40732         PyErr_Format(PyExc_ImportError,
40733         #if PY_MAJOR_VERSION < 3
40734             "cannot import name %.230s", PyString_AS_STRING(name));
40735         #else
40736             "cannot import name %S", name);
40737         #endif
40738     }
40739     return value;
40740 }
40741
40742 /* FetchCommonType */
40743 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
40744     PyObject* fake_module;
40745     PyTypeObject* cached_type = NULL;
40746     fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
40747     if (!fake_module) return NULL;
40748     Py_INCREF(fake_module);
40749     cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
40750     if (cached_type) {
40751         if (!PyType_Check((PyObject*)cached_type)) {
40752             PyErr_Format(PyExc_TypeError,
40753                 "Shared Cython type %.200s is not a type object",
40754                 type->tp_name);
40755             goto bad;
40756         }
40757         if (cached_type->tp_basicsize != type->tp_basicsize) {
40758             PyErr_Format(PyExc_TypeError,
40759                 "Shared Cython type %.200s has the wrong size, try recompiling",
40760                 type->tp_name);
40761             goto bad;
40762         }
40763     } else {
40764         if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
40765         PyErr_Clear();
40766         if (PyType_Ready(type) < 0) goto bad;
40767         if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
40768             goto bad;
40769         Py_INCREF(type);
40770         cached_type = type;
40771     }
40772 done:
40773     Py_DECREF(fake_module);
40774     return cached_type;
40775 bad:
40776     Py_XDECREF(cached_type);
40777     cached_type = NULL;
40778     goto done;
40779 }
40780
40781 /* CythonFunctionShared */
40782 #include <structmember.h>
40783 static PyObject *
40784 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
40785 {
40786     if (unlikely(op->func_doc == NULL)) {
40787         if (op->func.m_ml->ml_doc) {
40788 #if PY_MAJOR_VERSION >= 3
40789             op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
40790 #else
40791             op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
40792 #endif
40793             if (unlikely(op->func_doc == NULL))
40794                 return NULL;
40795         } else {
40796             Py_INCREF(Py_None);
40797             return Py_None;
40798         }
40799     }
40800     Py_INCREF(op->func_doc);
40801     return op->func_doc;
40802 }
40803 static int
40804 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
40805 {
40806     PyObject *tmp = op->func_doc;
40807     if (value == NULL) {
40808         value = Py_None;
40809     }
40810     Py_INCREF(value);
40811     op->func_doc = value;
40812     Py_XDECREF(tmp);
40813     return 0;
40814 }
40815 static PyObject *
40816 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40817 {
40818     if (unlikely(op->func_name == NULL)) {
40819 #if PY_MAJOR_VERSION >= 3
40820         op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
40821 #else
40822         op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
40823 #endif
40824         if (unlikely(op->func_name == NULL))
40825             return NULL;
40826     }
40827     Py_INCREF(op->func_name);
40828     return op->func_name;
40829 }
40830 static int
40831 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
40832 {
40833     PyObject *tmp;
40834 #if PY_MAJOR_VERSION >= 3
40835     if (unlikely(value == NULL || !PyUnicode_Check(value)))
40836 #else
40837     if (unlikely(value == NULL || !PyString_Check(value)))
40838 #endif
40839     {
40840         PyErr_SetString(PyExc_TypeError,
40841                         "__name__ must be set to a string object");
40842         return -1;
40843     }
40844     tmp = op->func_name;
40845     Py_INCREF(value);
40846     op->func_name = value;
40847     Py_XDECREF(tmp);
40848     return 0;
40849 }
40850 static PyObject *
40851 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40852 {
40853     Py_INCREF(op->func_qualname);
40854     return op->func_qualname;
40855 }
40856 static int
40857 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
40858 {
40859     PyObject *tmp;
40860 #if PY_MAJOR_VERSION >= 3
40861     if (unlikely(value == NULL || !PyUnicode_Check(value)))
40862 #else
40863     if (unlikely(value == NULL || !PyString_Check(value)))
40864 #endif
40865     {
40866         PyErr_SetString(PyExc_TypeError,
40867                         "__qualname__ must be set to a string object");
40868         return -1;
40869     }
40870     tmp = op->func_qualname;
40871     Py_INCREF(value);
40872     op->func_qualname = value;
40873     Py_XDECREF(tmp);
40874     return 0;
40875 }
40876 static PyObject *
40877 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
40878 {
40879     PyObject *self;
40880     self = m->func_closure;
40881     if (self == NULL)
40882         self = Py_None;
40883     Py_INCREF(self);
40884     return self;
40885 }
40886 static PyObject *
40887 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40888 {
40889     if (unlikely(op->func_dict == NULL)) {
40890         op->func_dict = PyDict_New();
40891         if (unlikely(op->func_dict == NULL))
40892             return NULL;
40893     }
40894     Py_INCREF(op->func_dict);
40895     return op->func_dict;
40896 }
40897 static int
40898 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
40899 {
40900     PyObject *tmp;
40901     if (unlikely(value == NULL)) {
40902         PyErr_SetString(PyExc_TypeError,
40903                "function's dictionary may not be deleted");
40904         return -1;
40905     }
40906     if (unlikely(!PyDict_Check(value))) {
40907         PyErr_SetString(PyExc_TypeError,
40908                "setting function's dictionary to a non-dict");
40909         return -1;
40910     }
40911     tmp = op->func_dict;
40912     Py_INCREF(value);
40913     op->func_dict = value;
40914     Py_XDECREF(tmp);
40915     return 0;
40916 }
40917 static PyObject *
40918 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40919 {
40920     Py_INCREF(op->func_globals);
40921     return op->func_globals;
40922 }
40923 static PyObject *
40924 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40925 {
40926     Py_INCREF(Py_None);
40927     return Py_None;
40928 }
40929 static PyObject *
40930 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40931 {
40932     PyObject* result = (op->func_code) ? op->func_code : Py_None;
40933     Py_INCREF(result);
40934     return result;
40935 }
40936 static int
40937 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
40938     int result = 0;
40939     PyObject *res = op->defaults_getter((PyObject *) op);
40940     if (unlikely(!res))
40941         return -1;
40942     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
40943     op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
40944     Py_INCREF(op->defaults_tuple);
40945     op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
40946     Py_INCREF(op->defaults_kwdict);
40947     #else
40948     op->defaults_tuple = PySequence_ITEM(res, 0);
40949     if (unlikely(!op->defaults_tuple)) result = -1;
40950     else {
40951         op->defaults_kwdict = PySequence_ITEM(res, 1);
40952         if (unlikely(!op->defaults_kwdict)) result = -1;
40953     }
40954     #endif
40955     Py_DECREF(res);
40956     return result;
40957 }
40958 static int
40959 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
40960     PyObject* tmp;
40961     if (!value) {
40962         value = Py_None;
40963     } else if (value != Py_None && !PyTuple_Check(value)) {
40964         PyErr_SetString(PyExc_TypeError,
40965                         "__defaults__ must be set to a tuple object");
40966         return -1;
40967     }
40968     Py_INCREF(value);
40969     tmp = op->defaults_tuple;
40970     op->defaults_tuple = value;
40971     Py_XDECREF(tmp);
40972     return 0;
40973 }
40974 static PyObject *
40975 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
40976     PyObject* result = op->defaults_tuple;
40977     if (unlikely(!result)) {
40978         if (op->defaults_getter) {
40979             if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
40980             result = op->defaults_tuple;
40981         } else {
40982             result = Py_None;
40983         }
40984     }
40985     Py_INCREF(result);
40986     return result;
40987 }
40988 static int
40989 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
40990     PyObject* tmp;
40991     if (!value) {
40992         value = Py_None;
40993     } else if (value != Py_None && !PyDict_Check(value)) {
40994         PyErr_SetString(PyExc_TypeError,
40995                         "__kwdefaults__ must be set to a dict object");
40996         return -1;
40997     }
40998     Py_INCREF(value);
40999     tmp = op->defaults_kwdict;
41000     op->defaults_kwdict = value;
41001     Py_XDECREF(tmp);
41002     return 0;
41003 }
41004 static PyObject *
41005 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
41006     PyObject* result = op->defaults_kwdict;
41007     if (unlikely(!result)) {
41008         if (op->defaults_getter) {
41009             if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
41010             result = op->defaults_kwdict;
41011         } else {
41012             result = Py_None;
41013         }
41014     }
41015     Py_INCREF(result);
41016     return result;
41017 }
41018 static int
41019 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
41020     PyObject* tmp;
41021     if (!value || value == Py_None) {
41022         value = NULL;
41023     } else if (!PyDict_Check(value)) {
41024         PyErr_SetString(PyExc_TypeError,
41025                         "__annotations__ must be set to a dict object");
41026         return -1;
41027     }
41028     Py_XINCREF(value);
41029     tmp = op->func_annotations;
41030     op->func_annotations = value;
41031     Py_XDECREF(tmp);
41032     return 0;
41033 }
41034 static PyObject *
41035 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
41036     PyObject* result = op->func_annotations;
41037     if (unlikely(!result)) {
41038         result = PyDict_New();
41039         if (unlikely(!result)) return NULL;
41040         op->func_annotations = result;
41041     }
41042     Py_INCREF(result);
41043     return result;
41044 }
41045 static PyGetSetDef __pyx_CyFunction_getsets[] = {
41046     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
41047     {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
41048     {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
41049     {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
41050     {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
41051     {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
41052     {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
41053     {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
41054     {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
41055     {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
41056     {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
41057     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
41058     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
41059     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
41060     {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
41061     {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
41062     {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
41063     {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
41064     {0, 0, 0, 0, 0}
41065 };
41066 static PyMemberDef __pyx_CyFunction_members[] = {
41067     {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
41068     {0, 0, 0,  0, 0}
41069 };
41070 static PyObject *
41071 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
41072 {
41073 #if PY_MAJOR_VERSION >= 3
41074     return PyUnicode_FromString(m->func.m_ml->ml_name);
41075 #else
41076     return PyString_FromString(m->func.m_ml->ml_name);
41077 #endif
41078 }
41079 static PyMethodDef __pyx_CyFunction_methods[] = {
41080     {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
41081     {0, 0, 0, 0}
41082 };
41083 #if PY_VERSION_HEX < 0x030500A0
41084 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
41085 #else
41086 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
41087 #endif
41088 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
41089                                        PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
41090     if (unlikely(op == NULL))
41091         return NULL;
41092     op->flags = flags;
41093     __Pyx_CyFunction_weakreflist(op) = NULL;
41094     op->func.m_ml = ml;
41095     op->func.m_self = (PyObject *) op;
41096     Py_XINCREF(closure);
41097     op->func_closure = closure;
41098     Py_XINCREF(module);
41099     op->func.m_module = module;
41100     op->func_dict = NULL;
41101     op->func_name = NULL;
41102     Py_INCREF(qualname);
41103     op->func_qualname = qualname;
41104     op->func_doc = NULL;
41105     op->func_classobj = NULL;
41106     op->func_globals = globals;
41107     Py_INCREF(op->func_globals);
41108     Py_XINCREF(code);
41109     op->func_code = code;
41110     op->defaults_pyobjects = 0;
41111     op->defaults_size = 0;
41112     op->defaults = NULL;
41113     op->defaults_tuple = NULL;
41114     op->defaults_kwdict = NULL;
41115     op->defaults_getter = NULL;
41116     op->func_annotations = NULL;
41117     return (PyObject *) op;
41118 }
41119 static int
41120 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
41121 {
41122     Py_CLEAR(m->func_closure);
41123     Py_CLEAR(m->func.m_module);
41124     Py_CLEAR(m->func_dict);
41125     Py_CLEAR(m->func_name);
41126     Py_CLEAR(m->func_qualname);
41127     Py_CLEAR(m->func_doc);
41128     Py_CLEAR(m->func_globals);
41129     Py_CLEAR(m->func_code);
41130     Py_CLEAR(m->func_classobj);
41131     Py_CLEAR(m->defaults_tuple);
41132     Py_CLEAR(m->defaults_kwdict);
41133     Py_CLEAR(m->func_annotations);
41134     if (m->defaults) {
41135         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
41136         int i;
41137         for (i = 0; i < m->defaults_pyobjects; i++)
41138             Py_XDECREF(pydefaults[i]);
41139         PyObject_Free(m->defaults);
41140         m->defaults = NULL;
41141     }
41142     return 0;
41143 }
41144 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
41145 {
41146     if (__Pyx_CyFunction_weakreflist(m) != NULL)
41147         PyObject_ClearWeakRefs((PyObject *) m);
41148     __Pyx_CyFunction_clear(m);
41149     PyObject_GC_Del(m);
41150 }
41151 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
41152 {
41153     PyObject_GC_UnTrack(m);
41154     __Pyx__CyFunction_dealloc(m);
41155 }
41156 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
41157 {
41158     Py_VISIT(m->func_closure);
41159     Py_VISIT(m->func.m_module);
41160     Py_VISIT(m->func_dict);
41161     Py_VISIT(m->func_name);
41162     Py_VISIT(m->func_qualname);
41163     Py_VISIT(m->func_doc);
41164     Py_VISIT(m->func_globals);
41165     Py_VISIT(m->func_code);
41166     Py_VISIT(m->func_classobj);
41167     Py_VISIT(m->defaults_tuple);
41168     Py_VISIT(m->defaults_kwdict);
41169     if (m->defaults) {
41170         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
41171         int i;
41172         for (i = 0; i < m->defaults_pyobjects; i++)
41173             Py_VISIT(pydefaults[i]);
41174     }
41175     return 0;
41176 }
41177 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
41178 {
41179 #if PY_MAJOR_VERSION < 3
41180     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41181     if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
41182         Py_INCREF(func);
41183         return func;
41184     }
41185     if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
41186         if (type == NULL)
41187             type = (PyObject *)(Py_TYPE(obj));
41188         return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
41189     }
41190     if (obj == Py_None)
41191         obj = NULL;
41192 #endif
41193     return __Pyx_PyMethod_New(func, obj, type);
41194 }
41195 static PyObject*
41196 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
41197 {
41198 #if PY_MAJOR_VERSION >= 3
41199     return PyUnicode_FromFormat("<cyfunction %U at %p>",
41200                                 op->func_qualname, (void *)op);
41201 #else
41202     return PyString_FromFormat("<cyfunction %s at %p>",
41203                                PyString_AsString(op->func_qualname), (void *)op);
41204 #endif
41205 }
41206 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
41207     PyCFunctionObject* f = (PyCFunctionObject*)func;
41208     PyCFunction meth = f->m_ml->ml_meth;
41209     Py_ssize_t size;
41210     switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
41211     case METH_VARARGS:
41212         if (likely(kw == NULL || PyDict_Size(kw) == 0))
41213             return (*meth)(self, arg);
41214         break;
41215     case METH_VARARGS | METH_KEYWORDS:
41216         return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
41217     case METH_NOARGS:
41218         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
41219             size = PyTuple_GET_SIZE(arg);
41220             if (likely(size == 0))
41221                 return (*meth)(self, NULL);
41222             PyErr_Format(PyExc_TypeError,
41223                 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
41224                 f->m_ml->ml_name, size);
41225             return NULL;
41226         }
41227         break;
41228     case METH_O:
41229         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
41230             size = PyTuple_GET_SIZE(arg);
41231             if (likely(size == 1)) {
41232                 PyObject *result, *arg0;
41233                 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
41234                 arg0 = PyTuple_GET_ITEM(arg, 0);
41235                 #else
41236                 arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
41237                 #endif
41238                 result = (*meth)(self, arg0);
41239                 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
41240                 Py_DECREF(arg0);
41241                 #endif
41242                 return result;
41243             }
41244             PyErr_Format(PyExc_TypeError,
41245                 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
41246                 f->m_ml->ml_name, size);
41247             return NULL;
41248         }
41249         break;
41250     default:
41251         PyErr_SetString(PyExc_SystemError, "Bad call flags in "
41252                         "__Pyx_CyFunction_Call. METH_OLDARGS is no "
41253                         "longer supported!");
41254         return NULL;
41255     }
41256     PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
41257                  f->m_ml->ml_name);
41258     return NULL;
41259 }
41260 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
41261     return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
41262 }
41263 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
41264     PyObject *result;
41265     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
41266     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
41267         Py_ssize_t argc;
41268         PyObject *new_args;
41269         PyObject *self;
41270         argc = PyTuple_GET_SIZE(args);
41271         new_args = PyTuple_GetSlice(args, 1, argc);
41272         if (unlikely(!new_args))
41273             return NULL;
41274         self = PyTuple_GetItem(args, 0);
41275         if (unlikely(!self)) {
41276             Py_DECREF(new_args);
41277             return NULL;
41278         }
41279         result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
41280         Py_DECREF(new_args);
41281     } else {
41282         result = __Pyx_CyFunction_Call(func, args, kw);
41283     }
41284     return result;
41285 }
41286 static PyTypeObject __pyx_CyFunctionType_type = {
41287     PyVarObject_HEAD_INIT(0, 0)
41288     "cython_function_or_method",
41289     sizeof(__pyx_CyFunctionObject),
41290     0,
41291     (destructor) __Pyx_CyFunction_dealloc,
41292     0,
41293     0,
41294     0,
41295 #if PY_MAJOR_VERSION < 3
41296     0,
41297 #else
41298     0,
41299 #endif
41300     (reprfunc) __Pyx_CyFunction_repr,
41301     0,
41302     0,
41303     0,
41304     0,
41305     __Pyx_CyFunction_CallAsMethod,
41306     0,
41307     0,
41308     0,
41309     0,
41310     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
41311     0,
41312     (traverseproc) __Pyx_CyFunction_traverse,
41313     (inquiry) __Pyx_CyFunction_clear,
41314     0,
41315 #if PY_VERSION_HEX < 0x030500A0
41316     offsetof(__pyx_CyFunctionObject, func_weakreflist),
41317 #else
41318     offsetof(PyCFunctionObject, m_weakreflist),
41319 #endif
41320     0,
41321     0,
41322     __pyx_CyFunction_methods,
41323     __pyx_CyFunction_members,
41324     __pyx_CyFunction_getsets,
41325     0,
41326     0,
41327     __Pyx_CyFunction_descr_get,
41328     0,
41329     offsetof(__pyx_CyFunctionObject, func_dict),
41330     0,
41331     0,
41332     0,
41333     0,
41334     0,
41335     0,
41336     0,
41337     0,
41338     0,
41339     0,
41340     0,
41341     0,
41342 #if PY_VERSION_HEX >= 0x030400a1
41343     0,
41344 #endif
41345 #if PY_VERSION_HEX >= 0x030800b1
41346     0,
41347 #endif
41348 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
41349     0,
41350 #endif
41351 };
41352 static int __pyx_CyFunction_init(void) {
41353     __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
41354     if (unlikely(__pyx_CyFunctionType == NULL)) {
41355         return -1;
41356     }
41357     return 0;
41358 }
41359 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
41360     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41361     m->defaults = PyObject_Malloc(size);
41362     if (unlikely(!m->defaults))
41363         return PyErr_NoMemory();
41364     memset(m->defaults, 0, size);
41365     m->defaults_pyobjects = pyobjects;
41366     m->defaults_size = size;
41367     return m->defaults;
41368 }
41369 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
41370     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41371     m->defaults_tuple = tuple;
41372     Py_INCREF(tuple);
41373 }
41374 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
41375     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41376     m->defaults_kwdict = dict;
41377     Py_INCREF(dict);
41378 }
41379 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
41380     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41381     m->func_annotations = dict;
41382     Py_INCREF(dict);
41383 }
41384
41385 /* CythonFunction */
41386 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
41387                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
41388     PyObject *op = __Pyx_CyFunction_Init(
41389         PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
41390         ml, flags, qualname, closure, module, globals, code
41391     );
41392     if (likely(op)) {
41393         PyObject_GC_Track(op);
41394     }
41395     return op;
41396 }
41397
41398 /* RegisterModuleCleanup */
41399 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
41400 static PyObject* __pyx_module_cleanup_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) {
41401     __pyx_module_cleanup(module);
41402     Py_INCREF(Py_None); return Py_None;
41403 }
41404 static int __Pyx_RegisterCleanup(void) {
41405     static PyMethodDef cleanup_def = {
41406         "__cleanup", (PyCFunction)__pyx_module_cleanup_atexit, METH_NOARGS, 0};
41407     PyObject *cleanup_func = 0;
41408     PyObject *atexit = 0;
41409     PyObject *reg = 0;
41410     PyObject *args = 0;
41411     PyObject *res = 0;
41412     int ret = -1;
41413     cleanup_func = PyCFunction_New(&cleanup_def, 0);
41414     if (!cleanup_func)
41415         goto bad;
41416     atexit = PyImport_ImportModule("atexit");
41417     if (!atexit)
41418         goto bad;
41419     reg = PyObject_GetAttrString(atexit, "_exithandlers");
41420     if (reg && PyList_Check(reg)) {
41421         PyObject *a, *kw;
41422         a = PyTuple_New(0);
41423         kw = PyDict_New();
41424         if (!a || !kw) {
41425             Py_XDECREF(a);
41426             Py_XDECREF(kw);
41427             goto bad;
41428         }
41429         args = PyTuple_Pack(3, cleanup_func, a, kw);
41430         Py_DECREF(a);
41431         Py_DECREF(kw);
41432         if (!args)
41433             goto bad;
41434         ret = PyList_Insert(reg, 0, args);
41435     } else {
41436         if (!reg)
41437             PyErr_Clear();
41438         Py_XDECREF(reg);
41439         reg = PyObject_GetAttrString(atexit, "register");
41440         if (!reg)
41441             goto bad;
41442         args = PyTuple_Pack(1, cleanup_func);
41443         if (!args)
41444             goto bad;
41445         res = PyObject_CallObject(reg, args);
41446         if (!res)
41447             goto bad;
41448         ret = 0;
41449     }
41450 bad:
41451     Py_XDECREF(cleanup_func);
41452     Py_XDECREF(atexit);
41453     Py_XDECREF(reg);
41454     Py_XDECREF(args);
41455     Py_XDECREF(res);
41456     return ret;
41457 }
41458 #endif
41459
41460 /* CLineInTraceback */
41461 #ifndef CYTHON_CLINE_IN_TRACEBACK
41462 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
41463     PyObject *use_cline;
41464     PyObject *ptype, *pvalue, *ptraceback;
41465 #if CYTHON_COMPILING_IN_CPYTHON
41466     PyObject **cython_runtime_dict;
41467 #endif
41468     if (unlikely(!__pyx_cython_runtime)) {
41469         return c_line;
41470     }
41471     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
41472 #if CYTHON_COMPILING_IN_CPYTHON
41473     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
41474     if (likely(cython_runtime_dict)) {
41475         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
41476             use_cline, *cython_runtime_dict,
41477             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
41478     } else
41479 #endif
41480     {
41481       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
41482       if (use_cline_obj) {
41483         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
41484         Py_DECREF(use_cline_obj);
41485       } else {
41486         PyErr_Clear();
41487         use_cline = NULL;
41488       }
41489     }
41490     if (!use_cline) {
41491         c_line = 0;
41492         PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
41493     }
41494     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
41495         c_line = 0;
41496     }
41497     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
41498     return c_line;
41499 }
41500 #endif
41501
41502 /* CodeObjectCache */
41503 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
41504     int start = 0, mid = 0, end = count - 1;
41505     if (end >= 0 && code_line > entries[end].code_line) {
41506         return count;
41507     }
41508     while (start < end) {
41509         mid = start + (end - start) / 2;
41510         if (code_line < entries[mid].code_line) {
41511             end = mid;
41512         } else if (code_line > entries[mid].code_line) {
41513              start = mid + 1;
41514         } else {
41515             return mid;
41516         }
41517     }
41518     if (code_line <= entries[mid].code_line) {
41519         return mid;
41520     } else {
41521         return mid + 1;
41522     }
41523 }
41524 static PyCodeObject *__pyx_find_code_object(int code_line) {
41525     PyCodeObject* code_object;
41526     int pos;
41527     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
41528         return NULL;
41529     }
41530     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
41531     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
41532         return NULL;
41533     }
41534     code_object = __pyx_code_cache.entries[pos].code_object;
41535     Py_INCREF(code_object);
41536     return code_object;
41537 }
41538 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
41539     int pos, i;
41540     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
41541     if (unlikely(!code_line)) {
41542         return;
41543     }
41544     if (unlikely(!entries)) {
41545         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
41546         if (likely(entries)) {
41547             __pyx_code_cache.entries = entries;
41548             __pyx_code_cache.max_count = 64;
41549             __pyx_code_cache.count = 1;
41550             entries[0].code_line = code_line;
41551             entries[0].code_object = code_object;
41552             Py_INCREF(code_object);
41553         }
41554         return;
41555     }
41556     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
41557     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
41558         PyCodeObject* tmp = entries[pos].code_object;
41559         entries[pos].code_object = code_object;
41560         Py_DECREF(tmp);
41561         return;
41562     }
41563     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
41564         int new_max = __pyx_code_cache.max_count + 64;
41565         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
41566             __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
41567         if (unlikely(!entries)) {
41568             return;
41569         }
41570         __pyx_code_cache.entries = entries;
41571         __pyx_code_cache.max_count = new_max;
41572     }
41573     for (i=__pyx_code_cache.count; i>pos; i--) {
41574         entries[i] = entries[i-1];
41575     }
41576     entries[pos].code_line = code_line;
41577     entries[pos].code_object = code_object;
41578     __pyx_code_cache.count++;
41579     Py_INCREF(code_object);
41580 }
41581
41582 /* AddTraceback */
41583 #include "compile.h"
41584 #include "frameobject.h"
41585 #include "traceback.h"
41586 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
41587             const char *funcname, int c_line,
41588             int py_line, const char *filename) {
41589     PyCodeObject *py_code = 0;
41590     PyObject *py_srcfile = 0;
41591     PyObject *py_funcname = 0;
41592     #if PY_MAJOR_VERSION < 3
41593     py_srcfile = PyString_FromString(filename);
41594     #else
41595     py_srcfile = PyUnicode_FromString(filename);
41596     #endif
41597     if (!py_srcfile) goto bad;
41598     if (c_line) {
41599         #if PY_MAJOR_VERSION < 3
41600         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
41601         #else
41602         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
41603         #endif
41604     }
41605     else {
41606         #if PY_MAJOR_VERSION < 3
41607         py_funcname = PyString_FromString(funcname);
41608         #else
41609         py_funcname = PyUnicode_FromString(funcname);
41610         #endif
41611     }
41612     if (!py_funcname) goto bad;
41613     py_code = __Pyx_PyCode_New(
41614         0,
41615         0,
41616         0,
41617         0,
41618         0,
41619         __pyx_empty_bytes, /*PyObject *code,*/
41620         __pyx_empty_tuple, /*PyObject *consts,*/
41621         __pyx_empty_tuple, /*PyObject *names,*/
41622         __pyx_empty_tuple, /*PyObject *varnames,*/
41623         __pyx_empty_tuple, /*PyObject *freevars,*/
41624         __pyx_empty_tuple, /*PyObject *cellvars,*/
41625         py_srcfile,   /*PyObject *filename,*/
41626         py_funcname,  /*PyObject *name,*/
41627         py_line,
41628         __pyx_empty_bytes  /*PyObject *lnotab*/
41629     );
41630     Py_DECREF(py_srcfile);
41631     Py_DECREF(py_funcname);
41632     return py_code;
41633 bad:
41634     Py_XDECREF(py_srcfile);
41635     Py_XDECREF(py_funcname);
41636     return NULL;
41637 }
41638 static void __Pyx_AddTraceback(const char *funcname, int c_line,
41639                                int py_line, const char *filename) {
41640     PyCodeObject *py_code = 0;
41641     PyFrameObject *py_frame = 0;
41642     PyThreadState *tstate = __Pyx_PyThreadState_Current;
41643     if (c_line) {
41644         c_line = __Pyx_CLineForTraceback(tstate, c_line);
41645     }
41646     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
41647     if (!py_code) {
41648         py_code = __Pyx_CreateCodeObjectForTraceback(
41649             funcname, c_line, py_line, filename);
41650         if (!py_code) goto bad;
41651         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
41652     }
41653     py_frame = PyFrame_New(
41654         tstate,            /*PyThreadState *tstate,*/
41655         py_code,           /*PyCodeObject *code,*/
41656         __pyx_d,    /*PyObject *globals,*/
41657         0                  /*PyObject *locals*/
41658     );
41659     if (!py_frame) goto bad;
41660     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
41661     PyTraceBack_Here(py_frame);
41662 bad:
41663     Py_XDECREF(py_code);
41664     Py_XDECREF(py_frame);
41665 }
41666
41667 /* CIntFromPyVerify */
41668 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
41669     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
41670 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
41671     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
41672 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
41673     {\
41674         func_type value = func_value;\
41675         if (sizeof(target_type) < sizeof(func_type)) {\
41676             if (unlikely(value != (func_type) (target_type) value)) {\
41677                 func_type zero = 0;\
41678                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
41679                     return (target_type) -1;\
41680                 if (is_unsigned && unlikely(value < zero))\
41681                     goto raise_neg_overflow;\
41682                 else\
41683                     goto raise_overflow;\
41684             }\
41685         }\
41686         return (target_type) value;\
41687     }
41688
41689 /* CIntToPy */
41690 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
41691     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
41692     const int is_unsigned = neg_one > const_zero;
41693     if (is_unsigned) {
41694         if (sizeof(long) < sizeof(long)) {
41695             return PyInt_FromLong((long) value);
41696         } else if (sizeof(long) <= sizeof(unsigned long)) {
41697             return PyLong_FromUnsignedLong((unsigned long) value);
41698 #ifdef HAVE_LONG_LONG
41699         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
41700             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
41701 #endif
41702         }
41703     } else {
41704         if (sizeof(long) <= sizeof(long)) {
41705             return PyInt_FromLong((long) value);
41706 #ifdef HAVE_LONG_LONG
41707         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
41708             return PyLong_FromLongLong((PY_LONG_LONG) value);
41709 #endif
41710         }
41711     }
41712     {
41713         int one = 1; int little = (int)*(unsigned char *)&one;
41714         unsigned char *bytes = (unsigned char *)&value;
41715         return _PyLong_FromByteArray(bytes, sizeof(long),
41716                                      little, !is_unsigned);
41717     }
41718 }
41719
41720 /* CIntToPy */
41721 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
41722     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
41723     const int is_unsigned = neg_one > const_zero;
41724     if (is_unsigned) {
41725         if (sizeof(int) < sizeof(long)) {
41726             return PyInt_FromLong((long) value);
41727         } else if (sizeof(int) <= sizeof(unsigned long)) {
41728             return PyLong_FromUnsignedLong((unsigned long) value);
41729 #ifdef HAVE_LONG_LONG
41730         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
41731             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
41732 #endif
41733         }
41734     } else {
41735         if (sizeof(int) <= sizeof(long)) {
41736             return PyInt_FromLong((long) value);
41737 #ifdef HAVE_LONG_LONG
41738         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
41739             return PyLong_FromLongLong((PY_LONG_LONG) value);
41740 #endif
41741         }
41742     }
41743     {
41744         int one = 1; int little = (int)*(unsigned char *)&one;
41745         unsigned char *bytes = (unsigned char *)&value;
41746         return _PyLong_FromByteArray(bytes, sizeof(int),
41747                                      little, !is_unsigned);
41748     }
41749 }
41750
41751 /* CIntFromPy */
41752 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
41753     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
41754     const int is_unsigned = neg_one > const_zero;
41755 #if PY_MAJOR_VERSION < 3
41756     if (likely(PyInt_Check(x))) {
41757         if (sizeof(int) < sizeof(long)) {
41758             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
41759         } else {
41760             long val = PyInt_AS_LONG(x);
41761             if (is_unsigned && unlikely(val < 0)) {
41762                 goto raise_neg_overflow;
41763             }
41764             return (int) val;
41765         }
41766     } else
41767 #endif
41768     if (likely(PyLong_Check(x))) {
41769         if (is_unsigned) {
41770 #if CYTHON_USE_PYLONG_INTERNALS
41771             const digit* digits = ((PyLongObject*)x)->ob_digit;
41772             switch (Py_SIZE(x)) {
41773                 case  0: return (int) 0;
41774                 case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
41775                 case 2:
41776                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
41777                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41778                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41779                         } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
41780                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
41781                         }
41782                     }
41783                     break;
41784                 case 3:
41785                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
41786                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41787                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41788                         } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
41789                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
41790                         }
41791                     }
41792                     break;
41793                 case 4:
41794                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
41795                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41796                             __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])))
41797                         } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
41798                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
41799                         }
41800                     }
41801                     break;
41802             }
41803 #endif
41804 #if CYTHON_COMPILING_IN_CPYTHON
41805             if (unlikely(Py_SIZE(x) < 0)) {
41806                 goto raise_neg_overflow;
41807             }
41808 #else
41809             {
41810                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
41811                 if (unlikely(result < 0))
41812                     return (int) -1;
41813                 if (unlikely(result == 1))
41814                     goto raise_neg_overflow;
41815             }
41816 #endif
41817             if (sizeof(int) <= sizeof(unsigned long)) {
41818                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
41819 #ifdef HAVE_LONG_LONG
41820             } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
41821                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
41822 #endif
41823             }
41824         } else {
41825 #if CYTHON_USE_PYLONG_INTERNALS
41826             const digit* digits = ((PyLongObject*)x)->ob_digit;
41827             switch (Py_SIZE(x)) {
41828                 case  0: return (int) 0;
41829                 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
41830                 case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
41831                 case -2:
41832                     if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
41833                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41834                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41835                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
41836                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41837                         }
41838                     }
41839                     break;
41840                 case 2:
41841                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
41842                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41843                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41844                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
41845                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41846                         }
41847                     }
41848                     break;
41849                 case -3:
41850                     if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
41851                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41852                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41853                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
41854                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41855                         }
41856                     }
41857                     break;
41858                 case 3:
41859                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
41860                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41861                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41862                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
41863                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41864                         }
41865                     }
41866                     break;
41867                 case -4:
41868                     if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
41869                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41870                             __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])))
41871                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
41872                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41873                         }
41874                     }
41875                     break;
41876                 case 4:
41877                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
41878                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41879                             __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])))
41880                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
41881                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41882                         }
41883                     }
41884                     break;
41885             }
41886 #endif
41887             if (sizeof(int) <= sizeof(long)) {
41888                 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
41889 #ifdef HAVE_LONG_LONG
41890             } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
41891                 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
41892 #endif
41893             }
41894         }
41895         {
41896 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
41897             PyErr_SetString(PyExc_RuntimeError,
41898                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
41899 #else
41900             int val;
41901             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
41902  #if PY_MAJOR_VERSION < 3
41903             if (likely(v) && !PyLong_Check(v)) {
41904                 PyObject *tmp = v;
41905                 v = PyNumber_Long(tmp);
41906                 Py_DECREF(tmp);
41907             }
41908  #endif
41909             if (likely(v)) {
41910                 int one = 1; int is_little = (int)*(unsigned char *)&one;
41911                 unsigned char *bytes = (unsigned char *)&val;
41912                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
41913                                               bytes, sizeof(val),
41914                                               is_little, !is_unsigned);
41915                 Py_DECREF(v);
41916                 if (likely(!ret))
41917                     return val;
41918             }
41919 #endif
41920             return (int) -1;
41921         }
41922     } else {
41923         int val;
41924         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
41925         if (!tmp) return (int) -1;
41926         val = __Pyx_PyInt_As_int(tmp);
41927         Py_DECREF(tmp);
41928         return val;
41929     }
41930 raise_overflow:
41931     PyErr_SetString(PyExc_OverflowError,
41932         "value too large to convert to int");
41933     return (int) -1;
41934 raise_neg_overflow:
41935     PyErr_SetString(PyExc_OverflowError,
41936         "can't convert negative value to int");
41937     return (int) -1;
41938 }
41939
41940 /* CIntFromPy */
41941 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
41942     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
41943     const int is_unsigned = neg_one > const_zero;
41944 #if PY_MAJOR_VERSION < 3
41945     if (likely(PyInt_Check(x))) {
41946         if (sizeof(long) < sizeof(long)) {
41947             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
41948         } else {
41949             long val = PyInt_AS_LONG(x);
41950             if (is_unsigned && unlikely(val < 0)) {
41951                 goto raise_neg_overflow;
41952             }
41953             return (long) val;
41954         }
41955     } else
41956 #endif
41957     if (likely(PyLong_Check(x))) {
41958         if (is_unsigned) {
41959 #if CYTHON_USE_PYLONG_INTERNALS
41960             const digit* digits = ((PyLongObject*)x)->ob_digit;
41961             switch (Py_SIZE(x)) {
41962                 case  0: return (long) 0;
41963                 case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
41964                 case 2:
41965                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
41966                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41967                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41968                         } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
41969                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
41970                         }
41971                     }
41972                     break;
41973                 case 3:
41974                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
41975                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41976                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41977                         } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
41978                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
41979                         }
41980                     }
41981                     break;
41982                 case 4:
41983                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
41984                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41985                             __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])))
41986                         } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
41987                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
41988                         }
41989                     }
41990                     break;
41991             }
41992 #endif
41993 #if CYTHON_COMPILING_IN_CPYTHON
41994             if (unlikely(Py_SIZE(x) < 0)) {
41995                 goto raise_neg_overflow;
41996             }
41997 #else
41998             {
41999                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
42000                 if (unlikely(result < 0))
42001                     return (long) -1;
42002                 if (unlikely(result == 1))
42003                     goto raise_neg_overflow;
42004             }
42005 #endif
42006             if (sizeof(long) <= sizeof(unsigned long)) {
42007                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
42008 #ifdef HAVE_LONG_LONG
42009             } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
42010                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
42011 #endif
42012             }
42013         } else {
42014 #if CYTHON_USE_PYLONG_INTERNALS
42015             const digit* digits = ((PyLongObject*)x)->ob_digit;
42016             switch (Py_SIZE(x)) {
42017                 case  0: return (long) 0;
42018                 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
42019                 case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
42020                 case -2:
42021                     if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
42022                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
42023                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42024                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
42025                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42026                         }
42027                     }
42028                     break;
42029                 case 2:
42030                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
42031                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
42032                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42033                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
42034                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42035                         }
42036                     }
42037                     break;
42038                 case -3:
42039                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
42040                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
42041                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42042                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
42043                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42044                         }
42045                     }
42046                     break;
42047                 case 3:
42048                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
42049                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
42050                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42051                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
42052                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42053                         }
42054                     }
42055                     break;
42056                 case -4:
42057                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
42058                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
42059                             __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])))
42060                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
42061                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42062                         }
42063                     }
42064                     break;
42065                 case 4:
42066                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
42067                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
42068                             __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])))
42069                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
42070                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42071                         }
42072                     }
42073                     break;
42074             }
42075 #endif
42076             if (sizeof(long) <= sizeof(long)) {
42077                 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
42078 #ifdef HAVE_LONG_LONG
42079             } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
42080                 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
42081 #endif
42082             }
42083         }
42084         {
42085 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
42086             PyErr_SetString(PyExc_RuntimeError,
42087                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
42088 #else
42089             long val;
42090             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
42091  #if PY_MAJOR_VERSION < 3
42092             if (likely(v) && !PyLong_Check(v)) {
42093                 PyObject *tmp = v;
42094                 v = PyNumber_Long(tmp);
42095                 Py_DECREF(tmp);
42096             }
42097  #endif
42098             if (likely(v)) {
42099                 int one = 1; int is_little = (int)*(unsigned char *)&one;
42100                 unsigned char *bytes = (unsigned char *)&val;
42101                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
42102                                               bytes, sizeof(val),
42103                                               is_little, !is_unsigned);
42104                 Py_DECREF(v);
42105                 if (likely(!ret))
42106                     return val;
42107             }
42108 #endif
42109             return (long) -1;
42110         }
42111     } else {
42112         long val;
42113         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
42114         if (!tmp) return (long) -1;
42115         val = __Pyx_PyInt_As_long(tmp);
42116         Py_DECREF(tmp);
42117         return val;
42118     }
42119 raise_overflow:
42120     PyErr_SetString(PyExc_OverflowError,
42121         "value too large to convert to long");
42122     return (long) -1;
42123 raise_neg_overflow:
42124     PyErr_SetString(PyExc_OverflowError,
42125         "can't convert negative value to long");
42126     return (long) -1;
42127 }
42128
42129 /* FastTypeChecks */
42130 #if CYTHON_COMPILING_IN_CPYTHON
42131 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
42132     while (a) {
42133         a = a->tp_base;
42134         if (a == b)
42135             return 1;
42136     }
42137     return b == &PyBaseObject_Type;
42138 }
42139 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
42140     PyObject *mro;
42141     if (a == b) return 1;
42142     mro = a->tp_mro;
42143     if (likely(mro)) {
42144         Py_ssize_t i, n;
42145         n = PyTuple_GET_SIZE(mro);
42146         for (i = 0; i < n; i++) {
42147             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
42148                 return 1;
42149         }
42150         return 0;
42151     }
42152     return __Pyx_InBases(a, b);
42153 }
42154 #if PY_MAJOR_VERSION == 2
42155 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
42156     PyObject *exception, *value, *tb;
42157     int res;
42158     __Pyx_PyThreadState_declare
42159     __Pyx_PyThreadState_assign
42160     __Pyx_ErrFetch(&exception, &value, &tb);
42161     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
42162     if (unlikely(res == -1)) {
42163         PyErr_WriteUnraisable(err);
42164         res = 0;
42165     }
42166     if (!res) {
42167         res = PyObject_IsSubclass(err, exc_type2);
42168         if (unlikely(res == -1)) {
42169             PyErr_WriteUnraisable(err);
42170             res = 0;
42171         }
42172     }
42173     __Pyx_ErrRestore(exception, value, tb);
42174     return res;
42175 }
42176 #else
42177 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
42178     int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
42179     if (!res) {
42180         res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
42181     }
42182     return res;
42183 }
42184 #endif
42185 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
42186     Py_ssize_t i, n;
42187     assert(PyExceptionClass_Check(exc_type));
42188     n = PyTuple_GET_SIZE(tuple);
42189 #if PY_MAJOR_VERSION >= 3
42190     for (i=0; i<n; i++) {
42191         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
42192     }
42193 #endif
42194     for (i=0; i<n; i++) {
42195         PyObject *t = PyTuple_GET_ITEM(tuple, i);
42196         #if PY_MAJOR_VERSION < 3
42197         if (likely(exc_type == t)) return 1;
42198         #endif
42199         if (likely(PyExceptionClass_Check(t))) {
42200             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
42201         } else {
42202         }
42203     }
42204     return 0;
42205 }
42206 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
42207     if (likely(err == exc_type)) return 1;
42208     if (likely(PyExceptionClass_Check(err))) {
42209         if (likely(PyExceptionClass_Check(exc_type))) {
42210             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
42211         } else if (likely(PyTuple_Check(exc_type))) {
42212             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
42213         } else {
42214         }
42215     }
42216     return PyErr_GivenExceptionMatches(err, exc_type);
42217 }
42218 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
42219     assert(PyExceptionClass_Check(exc_type1));
42220     assert(PyExceptionClass_Check(exc_type2));
42221     if (likely(err == exc_type1 || err == exc_type2)) return 1;
42222     if (likely(PyExceptionClass_Check(err))) {
42223         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
42224     }
42225     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
42226 }
42227 #endif
42228
42229 /* CheckBinaryVersion */
42230 static int __Pyx_check_binary_version(void) {
42231     char ctversion[4], rtversion[4];
42232     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
42233     PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
42234     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
42235         char message[200];
42236         PyOS_snprintf(message, sizeof(message),
42237                       "compiletime version %s of module '%.100s' "
42238                       "does not match runtime version %s",
42239                       ctversion, __Pyx_MODULE_NAME, rtversion);
42240         return PyErr_WarnEx(NULL, message, 1);
42241     }
42242     return 0;
42243 }
42244
42245 /* InitStrings */
42246 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
42247     while (t->p) {
42248         #if PY_MAJOR_VERSION < 3
42249         if (t->is_unicode) {
42250             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
42251         } else if (t->intern) {
42252             *t->p = PyString_InternFromString(t->s);
42253         } else {
42254             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
42255         }
42256         #else
42257         if (t->is_unicode | t->is_str) {
42258             if (t->intern) {
42259                 *t->p = PyUnicode_InternFromString(t->s);
42260             } else if (t->encoding) {
42261                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
42262             } else {
42263                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
42264             }
42265         } else {
42266             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
42267         }
42268         #endif
42269         if (!*t->p)
42270             return -1;
42271         if (PyObject_Hash(*t->p) == -1)
42272             return -1;
42273         ++t;
42274     }
42275     return 0;
42276 }
42277
42278 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
42279     return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
42280 }
42281 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
42282     Py_ssize_t ignore;
42283     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
42284 }
42285 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
42286 #if !CYTHON_PEP393_ENABLED
42287 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
42288     char* defenc_c;
42289     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
42290     if (!defenc) return NULL;
42291     defenc_c = PyBytes_AS_STRING(defenc);
42292 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
42293     {
42294         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
42295         char* c;
42296         for (c = defenc_c; c < end; c++) {
42297             if ((unsigned char) (*c) >= 128) {
42298                 PyUnicode_AsASCIIString(o);
42299                 return NULL;
42300             }
42301         }
42302     }
42303 #endif
42304     *length = PyBytes_GET_SIZE(defenc);
42305     return defenc_c;
42306 }
42307 #else
42308 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
42309     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
42310 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
42311     if (likely(PyUnicode_IS_ASCII(o))) {
42312         *length = PyUnicode_GET_LENGTH(o);
42313         return PyUnicode_AsUTF8(o);
42314     } else {
42315         PyUnicode_AsASCIIString(o);
42316         return NULL;
42317     }
42318 #else
42319     return PyUnicode_AsUTF8AndSize(o, length);
42320 #endif
42321 }
42322 #endif
42323 #endif
42324 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
42325 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
42326     if (
42327 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
42328             __Pyx_sys_getdefaultencoding_not_ascii &&
42329 #endif
42330             PyUnicode_Check(o)) {
42331         return __Pyx_PyUnicode_AsStringAndSize(o, length);
42332     } else
42333 #endif
42334 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
42335     if (PyByteArray_Check(o)) {
42336         *length = PyByteArray_GET_SIZE(o);
42337         return PyByteArray_AS_STRING(o);
42338     } else
42339 #endif
42340     {
42341         char* result;
42342         int r = PyBytes_AsStringAndSize(o, &result, length);
42343         if (unlikely(r < 0)) {
42344             return NULL;
42345         } else {
42346             return result;
42347         }
42348     }
42349 }
42350 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
42351    int is_true = x == Py_True;
42352    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
42353    else return PyObject_IsTrue(x);
42354 }
42355 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
42356     int retval;
42357     if (unlikely(!x)) return -1;
42358     retval = __Pyx_PyObject_IsTrue(x);
42359     Py_DECREF(x);
42360     return retval;
42361 }
42362 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
42363 #if PY_MAJOR_VERSION >= 3
42364     if (PyLong_Check(result)) {
42365         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
42366                 "__int__ returned non-int (type %.200s).  "
42367                 "The ability to return an instance of a strict subclass of int "
42368                 "is deprecated, and may be removed in a future version of Python.",
42369                 Py_TYPE(result)->tp_name)) {
42370             Py_DECREF(result);
42371             return NULL;
42372         }
42373         return result;
42374     }
42375 #endif
42376     PyErr_Format(PyExc_TypeError,
42377                  "__%.4s__ returned non-%.4s (type %.200s)",
42378                  type_name, type_name, Py_TYPE(result)->tp_name);
42379     Py_DECREF(result);
42380     return NULL;
42381 }
42382 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
42383 #if CYTHON_USE_TYPE_SLOTS
42384   PyNumberMethods *m;
42385 #endif
42386   const char *name = NULL;
42387   PyObject *res = NULL;
42388 #if PY_MAJOR_VERSION < 3
42389   if (likely(PyInt_Check(x) || PyLong_Check(x)))
42390 #else
42391   if (likely(PyLong_Check(x)))
42392 #endif
42393     return __Pyx_NewRef(x);
42394 #if CYTHON_USE_TYPE_SLOTS
42395   m = Py_TYPE(x)->tp_as_number;
42396   #if PY_MAJOR_VERSION < 3
42397   if (m && m->nb_int) {
42398     name = "int";
42399     res = m->nb_int(x);
42400   }
42401   else if (m && m->nb_long) {
42402     name = "long";
42403     res = m->nb_long(x);
42404   }
42405   #else
42406   if (likely(m && m->nb_int)) {
42407     name = "int";
42408     res = m->nb_int(x);
42409   }
42410   #endif
42411 #else
42412   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
42413     res = PyNumber_Int(x);
42414   }
42415 #endif
42416   if (likely(res)) {
42417 #if PY_MAJOR_VERSION < 3
42418     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
42419 #else
42420     if (unlikely(!PyLong_CheckExact(res))) {
42421 #endif
42422         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
42423     }
42424   }
42425   else if (!PyErr_Occurred()) {
42426     PyErr_SetString(PyExc_TypeError,
42427                     "an integer is required");
42428   }
42429   return res;
42430 }
42431 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
42432   Py_ssize_t ival;
42433   PyObject *x;
42434 #if PY_MAJOR_VERSION < 3
42435   if (likely(PyInt_CheckExact(b))) {
42436     if (sizeof(Py_ssize_t) >= sizeof(long))
42437         return PyInt_AS_LONG(b);
42438     else
42439         return PyInt_AsSsize_t(b);
42440   }
42441 #endif
42442   if (likely(PyLong_CheckExact(b))) {
42443     #if CYTHON_USE_PYLONG_INTERNALS
42444     const digit* digits = ((PyLongObject*)b)->ob_digit;
42445     const Py_ssize_t size = Py_SIZE(b);
42446     if (likely(__Pyx_sst_abs(size) <= 1)) {
42447         ival = likely(size) ? digits[0] : 0;
42448         if (size == -1) ival = -ival;
42449         return ival;
42450     } else {
42451       switch (size) {
42452          case 2:
42453            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
42454              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42455            }
42456            break;
42457          case -2:
42458            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
42459              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42460            }
42461            break;
42462          case 3:
42463            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
42464              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42465            }
42466            break;
42467          case -3:
42468            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
42469              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42470            }
42471            break;
42472          case 4:
42473            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
42474              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]));
42475            }
42476            break;
42477          case -4:
42478            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
42479              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]));
42480            }
42481            break;
42482       }
42483     }
42484     #endif
42485     return PyLong_AsSsize_t(b);
42486   }
42487   x = PyNumber_Index(b);
42488   if (!x) return -1;
42489   ival = PyInt_AsSsize_t(x);
42490   Py_DECREF(x);
42491   return ival;
42492 }
42493 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
42494   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
42495 }
42496 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
42497     return PyInt_FromSize_t(ival);
42498 }
42499
42500
42501 #endif /* Py_PYTHON_H */