Comment 2 for bug 1402433

Revision history for this message
KT (bintoro) wrote :

It's a different scenario. The case addressed by the 2.3 fix still works:

  <aaa:Parent xmlns:aaa="urn:aaa" xmlns:bbb="urn:bbb">
    <bbb:Child>foo</bbb:Child>
    <Child>foox</Child>
  </aaa:Parent>

  >>> root['{}Child']
  foox

This bug is about '{}' matching *too many things* (i.e., all namespaces) when using the numeric index notation. The bug reported in the newsgroup thread was about '{}' forcing the parent namespace and matching that only.

Compare the above result with this:

  >>> root['{}Child'][0]
  foo

Of course, index 0 should return 'foox' just like when the index is omitted.

By contrast, bug 1402432 (now marked as a dupe) was indeed the __setitem__ parallel of the old bug (forcing the parent namespace). Because of that I reported these two separately, not knowing whether these share the same root cause.