summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-01 00:28:59 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-01 00:28:59 (GMT)
commit496563a5146e2650dcf6f3595c58ff24f39a9afb (patch)
tree1afd27b48db59487d02d59abd52c7387dacaed28
parent62f5a9d6c2e99b688e388d33c226e41174640082 (diff)
downloadcpython-496563a5146e2650dcf6f3595c58ff24f39a9afb.zip
cpython-496563a5146e2650dcf6f3595c58ff24f39a9afb.tar.gz
cpython-496563a5146e2650dcf6f3595c58ff24f39a9afb.tar.bz2
Remove some now-obsolete generator future statements.
I left the email pkg alone; I'm not sure how Barry would like to handle that.
-rw-r--r--Lib/difflib.py2
-rw-r--r--Lib/test/test_generators.py2
-rw-r--r--Lib/test/test_parser.py12
-rw-r--r--Lib/test/test_profilehooks.py2
-rw-r--r--Lib/tokenize.py2
-rw-r--r--Lib/types.py4
6 files changed, 5 insertions, 19 deletions
diff --git a/Lib/difflib.py b/Lib/difflib.py
index a2689f4..db254e3 100644
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -1,7 +1,5 @@
#! /usr/bin/env python
-from __future__ import generators
-
"""
Module difflib -- helpers for computing deltas between objects.
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 155a83c..fb92ef4 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -1,5 +1,3 @@
-from __future__ import generators
-
tutorial_tests = """
Let's try a simple generator:
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 966f3e9..5df1e46 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -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")
diff --git a/Lib/test/test_profilehooks.py b/Lib/test/test_profilehooks.py
index fa38d30..8990e2c 100644
--- a/Lib/test/test_profilehooks.py
+++ b/Lib/test/test_profilehooks.py
@@ -1,5 +1,3 @@
-from __future__ import generators
-
from test_support import TestFailed
import pprint
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index f7ff000..27ee1bc 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -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'
diff --git a/Lib/types.py b/Lib/types.py
index 8a07950..41accfc 100644
--- a/Lib/types.py
+++ b/Lib/types.py
@@ -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