[vlc-commits] python bindings: iterators API now requires the __next__() method instead of next()

Olivier Aubert git at videolan.org
Mon Sep 10 17:00:17 CEST 2012


vlc/python | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Mon Sep 10 16:47:03 2012 +0200| [dca2bc700d307371e2b4225d7cb6654142b369da] | committer: Olivier Aubert

python bindings: iterators API now requires the __next__() method instead of next()

Implement both so that the code is python2+3 compatible

> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=dca2bc700d307371e2b4225d7cb6654142b369da
---

 override.py |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/override.py b/override.py
index be42fd7..38205a2 100644
--- a/override.py
+++ b/override.py
@@ -353,6 +353,9 @@ class LogIterator:
             return i.contents
         raise StopIteration
 
+    def __next__(self):
+        return self.next()
+
 class Log:
     """Create a new VLC log instance.
     """



More information about the vlc-commits mailing list