]> granicus.if.org Git - python/commitdiff
Remove some now-obsolete generator future statements.
authorTim Peters <tim.peters@gmail.com>
Mon, 1 Apr 2002 00:28:59 +0000 (00:28 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 1 Apr 2002 00:28:59 +0000 (00:28 +0000)
I left the email pkg alone; I'm not sure how Barry would like to handle
that.

Lib/difflib.py
Lib/test/test_generators.py
Lib/test/test_parser.py
Lib/test/test_profilehooks.py
Lib/tokenize.py
Lib/types.py

index a2689f406f2ede83bce18ebbbc580c282b772c90..db254e3fc3ff35e7d3a184842224f387a8e76b9b 100644 (file)
@@ -1,7 +1,5 @@
 #! /usr/bin/env python
 
-from __future__ import generators
-
 """
 Module difflib -- helpers for computing deltas between objects.
 
index 155a83cb21f202fb355de3156a12fbd5c36f4c6a..fb92ef472ba2818b60609d582b0f21641f337b50 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import generators
-
 tutorial_tests = """
 Let's try a simple generator:
 
index 966f3e99342357dc09ac2cf3a6dab8b6ec7d18d7..5df1e4613140122a8ed7446d215ff30b7a56ea5d 100644 (file)
@@ -27,14 +27,10 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
         self.roundtrip(parser.suite, s)
 
     def test_yield_statement(self):
-        self.check_suite("from __future__ import generators\n"
-                         "def f(): yield 1")
-        self.check_suite("from __future__ import generators\n"
-                         "def f(): return; yield 1")
-        self.check_suite("from __future__ import generators\n"
-                         "def f(): yield 1; return")
-        self.check_suite("from __future__ import generators\n"
-                         "def f():\n"
+        self.check_suite("def f(): yield 1")
+        self.check_suite("def f(): return; yield 1")
+        self.check_suite("def f(): yield 1; return")
+        self.check_suite("def f():\n"
                          "    for x in range(30):\n"
                          "        yield x\n")
 
index fa38d3047c7dee56c688819769e642143be7c1ff..8990e2ced2e37925ab4d8d3e142ea697fb2c0693 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import generators
-
 from test_support import TestFailed
 
 import pprint
index f7ff000d016a9a37fbbe58abc8f245067253954b..27ee1bc6fae204682aa7976bc128eef89660a008 100644 (file)
@@ -22,8 +22,6 @@ are the same, except instead of generating tokens, tokeneater is a callback
 function to which the 5 fields described above are passed as 5 arguments,
 each time a new token is found."""
 
-from __future__ import generators
-
 __author__ = 'Ka-Ping Yee <ping@lfw.org>'
 __credits__ = \
     'GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip Montanaro'
index 8a07950f7e98bf1588b92376052baf9887e1c059..41accfc94dffc879d630a582e61ebb1225b7008c 100644 (file)
@@ -2,8 +2,6 @@
 
 Types that are part of optional modules (e.g. array) are not listed.
 """
-from __future__ import generators
-
 import sys
 
 # Iterators in Python aren't a matter of type but of protocol.  A large
@@ -83,4 +81,4 @@ EllipsisType = type(Ellipsis)
 
 DictProxyType = type(TypeType.__dict__)
 
-del sys, _f, _C, _x, generators                  # Not for export
+del sys, _f, _C, _x                  # Not for export