[Python-checkins] CVS: python/dist/src/Lib/xml/dom pulldom.py,1.23,1.24
A.M. Kuchling
akuchling@users.sourceforge.net
Wed, 20 Mar 2002 15:56:37 -0800
Update of /cvsroot/python/python/dist/src/Lib/xml/dom
In directory usw-pr-cvs1:/tmp/cvs-serv27055
Modified Files:
pulldom.py
Log Message:
[Apply patch #500457 from the PyXML tracker]
Add iterator support to pulldom.DOMEventStream
New feature, so not a bugfix candidate (though it should be safe for inclusion)
Index: pulldom.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** pulldom.py 30 Nov 2001 22:22:26 -0000 1.23
--- pulldom.py 20 Mar 2002 23:56:34 -0000 1.24
***************
*** 228,231 ****
--- 228,240 ----
raise IndexError
+ def next(self):
+ rc = self.getEvent()
+ if rc:
+ return rc
+ raise StopIteration
+
+ def __iter__(self):
+ return self
+
def expandNode(self, node):
event = self.getEvent()