Add __future__ import for print_function. It's a no-op in 3.0, but it needs to not be a syntax error.

Closes issue 2436.
This commit is contained in:
Eric Smith 2008-03-20 23:02:08 +00:00
parent 2eb2c7c384
commit 87824086fa
5 changed files with 17 additions and 0 deletions

View file

@ -33,6 +33,8 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename)
continue;
} else if (strcmp(feature, FUTURE_WITH_STATEMENT) == 0) {
continue;
} else if (strcmp(feature, FUTURE_PRINT_FUNCTION) == 0) {
continue;
} else if (strcmp(feature, "braces") == 0) {
PyErr_SetString(PyExc_SyntaxError,
"not a chance");