classification
Title: pulldom.DOMEventStream.__getitem__ is broken
Type: behavior Stage: test needed
Components: XML Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, mark.smith
Priority: normal Keywords:

Created on 2010-07-24 13:04 by mark.smith, last changed 2010-07-24 13:46 by mark.smith.

Messages (3)
msg111475 - (view) Author: Mark Smith (mark.smith) * Date: 2010-07-24 13:04
DOMEventStream implements __getitem__, but ignores the index/key that is passed in and simply returns the next item from the stream. This is seriously unexpected behaviour.

I don't believe this functionality can be sensibly implemented in this class, and plan to submit a patch deprecating this method.
msg111477 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-07-24 13:10
You may want to keep existing functionality, this time in the proper method (__iter__).
msg111479 - (view) Author: Mark Smith (mark.smith) * Date: 2010-07-24 13:46
I should have mentioned: __iter__ is already implemented, and works as expected.
History
Date User Action Args
2010-07-24 13:46:55mark.smithsetmessages: + msg111479
2010-07-24 13:10:50eric.araujosetnosy: + eric.araujo
messages: + msg111477

type: behavior
stage: test needed
2010-07-24 13:04:52mark.smithcreate