mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Backport of the print function, using a __future__ import.
This work is substantially Anthony Baxter's, from issue 1633807. I just freshened it, made a few minor tweaks, and added the test cases. I also created issue 2412, which is to check for 2to3's behavior with the print function. I also added myself to ACKS.
This commit is contained in:
parent
6c0ff8aacd
commit
7c47894a2a
13 changed files with 238 additions and 34 deletions
|
@ -33,6 +33,8 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename)
|
|||
ff->ff_features |= CO_FUTURE_ABSOLUTE_IMPORT;
|
||||
} else if (strcmp(feature, FUTURE_WITH_STATEMENT) == 0) {
|
||||
ff->ff_features |= CO_FUTURE_WITH_STATEMENT;
|
||||
} else if (strcmp(feature, FUTURE_PRINT_FUNCTION) == 0) {
|
||||
ff->ff_features |= CO_FUTURE_PRINT_FUNCTION;
|
||||
} else if (strcmp(feature, "braces") == 0) {
|
||||
PyErr_SetString(PyExc_SyntaxError,
|
||||
"not a chance");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue