mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Don't abbreviate ABS, use long name ABSOLUTE.
This commit is contained in:
parent
f5af2aac38
commit
cbce280d4f
6 changed files with 8 additions and 8 deletions
|
@ -2476,7 +2476,7 @@ compiler_import(struct compiler *c, stmt_ty s)
|
|||
int r;
|
||||
PyObject *level;
|
||||
|
||||
if (c->c_flags && (c->c_flags->cf_flags & CO_FUTURE_ABSIMPORT))
|
||||
if (c->c_flags && (c->c_flags->cf_flags & CO_FUTURE_ABSOLUTE_IMPORT))
|
||||
level = PyInt_FromLong(0);
|
||||
else
|
||||
level = PyInt_FromLong(-1);
|
||||
|
@ -2524,7 +2524,7 @@ compiler_from_import(struct compiler *c, stmt_ty s)
|
|||
return 0;
|
||||
|
||||
if (s->v.ImportFrom.level == 0 && c->c_flags &&
|
||||
!(c->c_flags->cf_flags & CO_FUTURE_ABSIMPORT))
|
||||
!(c->c_flags->cf_flags & CO_FUTURE_ABSOLUTE_IMPORT))
|
||||
level = PyInt_FromLong(-1);
|
||||
else
|
||||
level = PyInt_FromLong(s->v.ImportFrom.level);
|
||||
|
|
|
@ -29,8 +29,8 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename)
|
|||
continue;
|
||||
} else if (strcmp(feature, FUTURE_DIVISION) == 0) {
|
||||
ff->ff_features |= CO_FUTURE_DIVISION;
|
||||
} else if (strcmp(feature, FUTURE_ABSIMPORT) == 0) {
|
||||
ff->ff_features |= CO_FUTURE_ABSIMPORT;
|
||||
} else if (strcmp(feature, FUTURE_ABSOLUTE_IMPORT) == 0) {
|
||||
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, "braces") == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue