summaryrefslogtreecommitdiff
path: root/Lib/__future__.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-06-11 13:18:56 -0700
committerBenjamin Peterson <benjamin@python.org>2016-06-11 13:18:56 -0700
commit5a991226e84e935f2a50deec664eaf3860893354 (patch)
treee674175fd5bc642be83ceb674d57e303b26f4326 /Lib/__future__.py
parent9997d0207649b71b5862d3c036c1f7dcacf4f7b1 (diff)
parent1ccde8e1ad13ea6943f6ef5ea4329c9827ba493e (diff)
downloadcpython-5a991226e84e935f2a50deec664eaf3860893354.tar.gz
merge 3.4
Diffstat (limited to 'Lib/__future__.py')
-rw-r--r--Lib/__future__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/__future__.py b/Lib/__future__.py
index 3b2d5ecb92..63b2be3524 100644
--- a/Lib/__future__.py
+++ b/Lib/__future__.py
@@ -56,6 +56,7 @@ all_feature_names = [
"print_function",
"unicode_literals",
"barry_as_FLUFL",
+ "generator_stop",
]
__all__ = ["all_feature_names"] + all_feature_names
@@ -72,6 +73,7 @@ CO_FUTURE_WITH_STATEMENT = 0x8000 # with statement
CO_FUTURE_PRINT_FUNCTION = 0x10000 # print function
CO_FUTURE_UNICODE_LITERALS = 0x20000 # unicode string literals
CO_FUTURE_BARRY_AS_BDFL = 0x40000
+CO_FUTURE_GENERATOR_STOP = 0x80000 # StopIteration becomes RuntimeError in generators
class _Feature:
def __init__(self, optionalRelease, mandatoryRelease, compiler_flag):
@@ -132,3 +134,7 @@ unicode_literals = _Feature((2, 6, 0, "alpha", 2),
barry_as_FLUFL = _Feature((3, 1, 0, "alpha", 2),
(3, 9, 0, "alpha", 0),
CO_FUTURE_BARRY_AS_BDFL)
+
+generator_stop = _Feature((3, 5, 0, "beta", 1),
+ (3, 7, 0, "alpha", 0),
+ CO_FUTURE_GENERATOR_STOP)