diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-09 15:44:30 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-09 15:44:30 (GMT) |
commit | 8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26 (patch) | |
tree | d6353155110b49bf7953fd0d7d3f808512e8feb1 /Lib/__future__.py | |
parent | bd60e8dece89440ebdc80a19b2217d5ba2515124 (diff) | |
download | cpython-8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26.zip cpython-8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26.tar.gz cpython-8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26.tar.bz2 |
PEP 479: Change StopIteration handling inside generators.
Closes issue #22906.
Diffstat (limited to 'Lib/__future__.py')
-rw-r--r-- | Lib/__future__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/__future__.py b/Lib/__future__.py index 3b2d5ec..63b2be3 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) |