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.
This commit is contained in:
parent
77c92df29b
commit
b6893e3c49
13
pep-0236.txt
13
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue