From b6893e3c4943e0218a9f57bf68023c01748a0824 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Fri, 2 Mar 2001 02:53:08 +0000 Subject: [PATCH] Make names in __future__.py bind to class instances instead of 2-tuples. Suggested on c.l.py by William Tanksley, and I like it. --- pep-0236.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pep-0236.txt b/pep-0236.txt index d3aba5bc5..0153e797b 100644 --- a/pep-0236.txt +++ b/pep-0236.txt @@ -165,11 +165,7 @@ Standard Module __future__.py Each statment in __future__.py is of the form: - FeatureName = ReleaseInfo - - ReleaseInfo is a pair of the form: - - (OptionalRelease, MandatoryRelease) + FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease) ")" where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples of the same form as sys.version_info: @@ -201,11 +197,14 @@ Standard Module __future__.py MandatoryRelease may also be None, meaning that a planned feature got dropped. - No line will ever be deleted from __future__.py. + Instances of class _Feature have two corresponding methods, + .getOptionalRelease() and .getMandatoryRelease(). + + No feature line will ever be deleted from __future__.py. Example line: - nested_scopes = (2, 1, 0, "beta", 1), (2, 2, 0, "final", 0) + nested_scopes = _Feature((2, 1, 0, "beta", 1), (2, 2, 0, "final", 0)) This means that