diff options
Diffstat (limited to 'Lib/xml')
-rw-r--r-- | Lib/xml/dom/pulldom.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py index 43504f7..96a8d59 100644 --- a/Lib/xml/dom/pulldom.py +++ b/Lib/xml/dom/pulldom.py @@ -217,6 +217,13 @@ class DOMEventStream: self.parser.setContentHandler(self.pulldom) def __getitem__(self, pos): + import warnings + warnings.warn( + "DOMEventStream's __getitem__ method ignores 'pos' parameter. " + "Use iterator protocol instead.", + DeprecationWarning, + stacklevel=2 + ) rc = self.getEvent() if rc: return rc |