Skip to content

Commit

Permalink
Handling of __next__ and next by future.utils.get_next was reversed
Browse files Browse the repository at this point in the history
I assume nobody is using future.utils.get_next, because the builtin next() function exists from Python 2.6 on and meets most needs, and because nobody has noticed this before. Fixing in case it saves anyone confusion in future.
  • Loading branch information
GlenWalker committed Jan 17, 2020
1 parent 01a1d31 commit 52b0ff9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/future/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ def __next__(self):
return cls

if PY3:
get_next = lambda x: x.next
else:
get_next = lambda x: x.__next__
else:
get_next = lambda x: x.next


def encode_filename(filename):
Expand Down

0 comments on commit 52b0ff9

Please sign in to comment.