diff options
| author | scoder <none@none> | 2007-09-19 14:49:50 +0200 |
|---|---|---|
| committer | scoder <none@none> | 2007-09-19 14:49:50 +0200 |
| commit | 6c7907068f9889351ed41dc91789f1a0148dcfd1 (patch) | |
| tree | 2efbd046314de997d6af406878eccbd94b2cdf7a /src/lxml/objectify.pyx | |
| parent | 94efed83d0184480c3aa49b7df3598d69c45a298 (diff) | |
| download | python-lxml-6c7907068f9889351ed41dc91789f1a0148dcfd1.tar.gz | |
[svn r2897] fix unicode annotation in DataElement
--HG--
branch : trunk
Diffstat (limited to 'src/lxml/objectify.pyx')
| -rw-r--r-- | src/lxml/objectify.pyx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lxml/objectify.pyx b/src/lxml/objectify.pyx index ed357614..a8d7a8c8 100644 --- a/src/lxml/objectify.pyx +++ b/src/lxml/objectify.pyx @@ -925,15 +925,12 @@ cdef _lower_bool(b): def __lower_bool(b): return _lower_bool(b) -cdef _get_pytypename(obj): +cdef _pytypename(obj): if python.PyUnicode_Check(obj): return "str" else: return _typename(obj) -def __get_pytypename(obj): - return _get_pytypename(obj) - cdef _registerPyTypes(): pytype = PyType('int', int, IntElement) pytype.xmlSchemaTypes = ("int", "short", "byte", "unsignedShort", @@ -1751,8 +1748,8 @@ def DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, strval = str(_value) if _pytype is None: - _pytype = _typename(_value) - + _pytype = _pytypename(_value) + if _pytype is not None: if _pytype == "NoneType" or _pytype == "none": strval = None |
