Mercurial > cpython-lru_cache-weakref
diff Python/future.c @ 45891:727f743cf630 legacy-trunk
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.
| author | Eric Smith <eric@trueblade.com> |
|---|---|
| date | Tue, 18 Mar 2008 23:45:49 +0000 |
| parents | f3c1f9c8ce9f |
| children | c78d3586c474 |
line wrap: on
line diff
--- a/Python/future.c Tue Mar 18 23:33:08 2008 +0000 +++ b/Python/future.c Tue Mar 18 23:45:49 2008 +0000 @@ -33,6 +33,8 @@ 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");
