From ec5bfd13cada33ed36f93fd76b1355ce9ee2710f Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Sat, 18 Aug 2001 00:07:46 +0000 Subject: [PATCH] Track removal of doc string from Module().nodes[0] --- Lib/compiler/future.py | 9 ++------- Tools/compiler/compiler/future.py | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Lib/compiler/future.py b/Lib/compiler/future.py index fe25b72a2e8..09ffe4a5446 100644 --- a/Lib/compiler/future.py +++ b/Lib/compiler/future.py @@ -15,19 +15,14 @@ def is_future(stmt): class FutureParser: - features = ("nested_scopes",) + features = ("nested_scopes", "generators", "division") def __init__(self): self.found = {} # set def visitModule(self, node): - if node.doc is None: - off = 0 - else: - off = 1 - stmt = node.node - for s in stmt.nodes[off:]: + for s in stmt.nodes: if not self.check_stmt(s): break diff --git a/Tools/compiler/compiler/future.py b/Tools/compiler/compiler/future.py index fe25b72a2e8..09ffe4a5446 100644 --- a/Tools/compiler/compiler/future.py +++ b/Tools/compiler/compiler/future.py @@ -15,19 +15,14 @@ def is_future(stmt): class FutureParser: - features = ("nested_scopes",) + features = ("nested_scopes", "generators", "division") def __init__(self): self.found = {} # set def visitModule(self, node): - if node.doc is None: - off = 0 - else: - off = 1 - stmt = node.node - for s in stmt.nodes[off:]: + for s in stmt.nodes: if not self.check_stmt(s): break