Cython has moved to github.

cython-devel

view Cython/Compiler/Future.py @ 3068:f9baa86d0372

support 'from __future__ import print_function' in Py2.6+
author Stefan Behnel <scoder@users.berlios.de>
date Wed Mar 10 08:46:58 2010 +0100 (2 years ago)
parents 1fc1f36014b9
children a85ea2e9c883
line source
1 def _get_feature(name):
2 import __future__
3 try:
4 return getattr(__future__, name)
5 except AttributeError:
6 # unique fake object for earlier Python versions
7 return object()
9 unicode_literals = _get_feature("unicode_literals")
10 with_statement = _get_feature("with_statement")
11 division = _get_feature("division")
12 print_function = _get_feature("print_function")
14 del _get_feature