mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
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:
parent
2eb2c7c384
commit
87824086fa
5 changed files with 17 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue