summaryrefslogtreecommitdiffstats
path: root/Python/future.c
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2008-03-18 23:45:49 (GMT)
committerEric Smith <eric@trueblade.com>2008-03-18 23:45:49 (GMT)
commit7c47894a2aaa8dbc5397a256b16cd7deddef1d7e (patch)
tree8a04cef2a98907c1f20cde46f0efec77a5730a65 /Python/future.c
parent6c0ff8aacd5b493892878e138b97af66e4bfaf37 (diff)
downloadcpython-7c47894a2aaa8dbc5397a256b16cd7deddef1d7e.zip
cpython-7c47894a2aaa8dbc5397a256b16cd7deddef1d7e.tar.gz
cpython-7c47894a2aaa8dbc5397a256b16cd7deddef1d7e.tar.bz2
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.
Diffstat (limited to 'Python/future.c')
-rw-r--r--Python/future.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/future.c b/Python/future.c
index af1e1cc..267e1b7 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -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");