[lxml-dev] Bug: type annotation namespace-prefix goes missing
Stefan Behnel
stefan_ml at behnel.de
Fri Feb 8 19:51:30 CET 2008
Hi,
Stefan Behnel wrote:
> jholg at gmx.de wrote:
>> I can confirm the objectify case works for me now:
>>>>> l = [1, 2, 3, 4]
>>>>> l[2:3] = ["a", "b", "c", "d"]
>>>>> l
>> [1, 2, 'a', 'b', 'c', 'd', 4]
>>>>> root = objectify.Element("root")
>>>>> root.l = [1, 2, 3, 4]
>>>>> root.l[2:3] = ["a", "b", "c", "d"]
>>>>> print objectify.dump(root)
>> root = None [ObjectifiedElement]
>> l = 1 [IntElement]
>> * py:pytype = 'int'
>> l = 2 [IntElement]
>> * py:pytype = 'int'
>> l = 'a' [StringElement]
>> * py:pytype = 'str'
>> l = 4 [IntElement]
>> * py:pytype = 'int'
>> l = 'b' [StringElement]
>> * py:pytype = 'str'
>> l = 'c' [StringElement]
>> * py:pytype = 'str'
>> l = 'd' [StringElement]
>> * py:pytype = 'str'
>>
>> So the correct slice gets substituted, but the order is a bit confused.
>
> Right, we were definitely missing test cases here. I'll add some to see if I
> can fix it. The first bunch is in SVN, some of them failing (seems to be
> __getitem__() already, which I didn't change).
Should be fixed on the trunk now.
Stefan
More information about the lxml-dev
mailing list