From ed3fbb0592f4123d11c22256f609afc71bec878e Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 11 Apr 2011 22:44:33 +0200 Subject: [PATCH] support 'from __future__ import generators' --- Cython/Compiler/Future.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Future.py b/Cython/Compiler/Future.py index 9955a813..f3fc9148 100644 --- a/Cython/Compiler/Future.py +++ b/Cython/Compiler/Future.py @@ -3,7 +3,7 @@ def _get_feature(name): try: return getattr(__future__, name) except AttributeError: - # unique fake object for earlier Python versions + # unique fake object for earlier Python versions or Python 3 return object() unicode_literals = _get_feature("unicode_literals") @@ -11,5 +11,6 @@ with_statement = _get_feature("with_statement") division = _get_feature("division") print_function = _get_feature("print_function") nested_scopes = _get_feature("nested_scopes") # dummy +generators = _get_feature("generators") # dummy del _get_feature -- 2.26.2