From 52b0ff92c8ad2c4dac274749a85c5f7a629f185a Mon Sep 17 00:00:00 2001 From: Glen Walker Date: Fri, 17 Jan 2020 13:29:33 +1300 Subject: [PATCH] Handling of __next__ and next by future.utils.get_next was reversed 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. --- src/future/utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/future/utils/__init__.py b/src/future/utils/__init__.py index 46bd96de..846d5da6 100644 --- a/src/future/utils/__init__.py +++ b/src/future/utils/__init__.py @@ -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):