diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-04-16 14:54:27 -0700 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-04-16 14:54:27 -0700 |
commit | e10c2d6ab9e3ee5ebeca76a34dd93d624b579da1 (patch) | |
tree | 2a0216a274628659694e875dd03ffe65ab5344ad /Python/future.c | |
parent | 52fdbac919f35a276a2924a1dfe8b71c2b497db2 (diff) | |
parent | 88a7179f982d5982844e7e57c303c2df1f5e7854 (diff) | |
download | cpython-e10c2d6ab9e3ee5ebeca76a34dd93d624b579da1.tar.gz |
merge 3.5 (#26659)
Diffstat (limited to 'Python/future.c')
-rw-r--r-- | Python/future.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c index 163f87f673..75f210769e 100644 --- a/Python/future.c +++ b/Python/future.c @@ -79,7 +79,10 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, PyObject *filename) i = 0; first = (stmt_ty)asdl_seq_GET(mod->v.Module.body, i); - if (first->kind == Expr_kind && first->v.Expr.value->kind == Str_kind) + if (first->kind == Expr_kind + && (first->v.Expr.value->kind == Str_kind + || (first->v.Expr.value->kind == Constant_kind + && PyUnicode_CheckExact(first->v.Expr.value->v.Constant.value)))) i++; |