Skip to content

Commit

Permalink
Iterator compatibility for Python 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpearce committed May 31, 2017
1 parent 9fca3d4 commit 6188d49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bindings/python/libs/client/file.py
Expand Up @@ -46,6 +46,9 @@ def __iter__(self):
def __next__(self):
return self.__file.next()

# Python 2 compatibility
next = __next__

def open(self, url, flags=0, mode=0, timeout=0, callback=None):
"""Open the file pointed to by the given URL.
Expand Down

0 comments on commit 6188d49

Please sign in to comment.