Remove some now-obsolete generator future statements.
I left the email pkg alone; I'm not sure how Barry would like to handle that.
This commit is contained in:
parent
62f5a9d6c2
commit
496563a514
@ -1,7 +1,5 @@
|
|||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
|
|
||||||
from __future__ import generators
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Module difflib -- helpers for computing deltas between objects.
|
Module difflib -- helpers for computing deltas between objects.
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
from __future__ import generators
|
|
||||||
|
|
||||||
tutorial_tests = """
|
tutorial_tests = """
|
||||||
Let's try a simple generator:
|
Let's try a simple generator:
|
||||||
|
|
||||||
|
@ -27,14 +27,10 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
|
|||||||
self.roundtrip(parser.suite, s)
|
self.roundtrip(parser.suite, s)
|
||||||
|
|
||||||
def test_yield_statement(self):
|
def test_yield_statement(self):
|
||||||
self.check_suite("from __future__ import generators\n"
|
self.check_suite("def f(): yield 1")
|
||||||
"def f(): yield 1")
|
self.check_suite("def f(): return; yield 1")
|
||||||
self.check_suite("from __future__ import generators\n"
|
self.check_suite("def f(): yield 1; return")
|
||||||
"def f(): return; yield 1")
|
self.check_suite("def f():\n"
|
||||||
self.check_suite("from __future__ import generators\n"
|
|
||||||
"def f(): yield 1; return")
|
|
||||||
self.check_suite("from __future__ import generators\n"
|
|
||||||
"def f():\n"
|
|
||||||
" for x in range(30):\n"
|
" for x in range(30):\n"
|
||||||
" yield x\n")
|
" yield x\n")
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
from __future__ import generators
|
|
||||||
|
|
||||||
from test_support import TestFailed
|
from test_support import TestFailed
|
||||||
|
|
||||||
import pprint
|
import pprint
|
||||||
|
@ -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,
|
function to which the 5 fields described above are passed as 5 arguments,
|
||||||
each time a new token is found."""
|
each time a new token is found."""
|
||||||
|
|
||||||
from __future__ import generators
|
|
||||||
|
|
||||||
__author__ = 'Ka-Ping Yee <ping@lfw.org>'
|
__author__ = 'Ka-Ping Yee <ping@lfw.org>'
|
||||||
__credits__ = \
|
__credits__ = \
|
||||||
'GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip Montanaro'
|
'GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip Montanaro'
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
Types that are part of optional modules (e.g. array) are not listed.
|
Types that are part of optional modules (e.g. array) are not listed.
|
||||||
"""
|
"""
|
||||||
from __future__ import generators
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Iterators in Python aren't a matter of type but of protocol. A large
|
# 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__)
|
DictProxyType = type(TypeType.__dict__)
|
||||||
|
|
||||||
del sys, _f, _C, _x, generators # Not for export
|
del sys, _f, _C, _x # Not for export
|
||||||
|
Loading…
x
Reference in New Issue
Block a user