mirror of
https://github.com/python/cpython.git
synced 2025-07-27 05:04:15 +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
|
@ -738,18 +738,19 @@ PyRun_InteractiveLoopFlags(FILE *fp, const char *filename, PyCompilerFlags *flag
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* compute parser flags based on compiler flags */
|
||||
#define PARSER_FLAGS(flags) \
|
||||
((flags) ? ((((flags)->cf_flags & PyCF_DONT_IMPLY_DEDENT) ? \
|
||||
PyPARSE_DONT_IMPLY_DEDENT : 0)) : 0)
|
||||
|
||||
#if 0
|
||||
#endif
|
||||
#if 1
|
||||
/* Keep an example of flags with future keyword support. */
|
||||
#define PARSER_FLAGS(flags) \
|
||||
((flags) ? ((((flags)->cf_flags & PyCF_DONT_IMPLY_DEDENT) ? \
|
||||
PyPARSE_DONT_IMPLY_DEDENT : 0) \
|
||||
| ((flags)->cf_flags & CO_FUTURE_WITH_STATEMENT ? \
|
||||
PyPARSE_WITH_IS_KEYWORD : 0)) : 0)
|
||||
| ((flags)->cf_flags & CO_FUTURE_PRINT_FUNCTION ? \
|
||||
PyPARSE_PRINT_IS_FUNCTION : 0)) : 0)
|
||||
#endif
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue