diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2016-05-27 12:56:41 -0600 |
---|---|---|
committer | Eric Snow <ericsnowcurrently@gmail.com> | 2016-05-27 12:56:41 -0600 |
commit | 1f1268c0bc93629b7abc16d8af9cf997c32a947b (patch) | |
tree | 39ee4dfe533b80ba355fc850ca5de5bc85c09ec0 /Python/future.c | |
parent | f9990315cdea1d35808ed89f11a4fe388944553e (diff) | |
parent | 3bd347c543f3849bc5c70f7c07aa02bb204d3060 (diff) | |
download | cpython-1f1268c0bc93629b7abc16d8af9cf997c32a947b.tar.gz |
Issue #27138: Fix the doc comment for FileFinder.find_spec().
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++; |