From: Stefan Behnel Date: Mon, 11 Apr 2011 20:44:33 +0000 (+0200) Subject: support 'from __future__ import generators' X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ed3fbb0592f4123d11c22256f609afc71bec878e;p=cython.git support 'from __future__ import generators' --- 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