Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/smanonr..../lib64/python3....
File: __future__.py
"""Record of phased-in incompatible language changes.
[0] Fix | Delete
[1] Fix | Delete
Each line is of the form:
[2] Fix | Delete
[3] Fix | Delete
FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease ","
[4] Fix | Delete
CompilerFlag ")"
[5] Fix | Delete
[6] Fix | Delete
where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples
[7] Fix | Delete
of the same form as sys.version_info:
[8] Fix | Delete
[9] Fix | Delete
(PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int
[10] Fix | Delete
PY_MINOR_VERSION, # the 1; an int
[11] Fix | Delete
PY_MICRO_VERSION, # the 0; an int
[12] Fix | Delete
PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; string
[13] Fix | Delete
PY_RELEASE_SERIAL # the 3; an int
[14] Fix | Delete
)
[15] Fix | Delete
[16] Fix | Delete
OptionalRelease records the first release in which
[17] Fix | Delete
[18] Fix | Delete
from __future__ import FeatureName
[19] Fix | Delete
[20] Fix | Delete
was accepted.
[21] Fix | Delete
[22] Fix | Delete
In the case of MandatoryReleases that have not yet occurred,
[23] Fix | Delete
MandatoryRelease predicts the release in which the feature will become part
[24] Fix | Delete
of the language.
[25] Fix | Delete
[26] Fix | Delete
Else MandatoryRelease records when the feature became part of the language;
[27] Fix | Delete
in releases at or after that, modules no longer need
[28] Fix | Delete
[29] Fix | Delete
from __future__ import FeatureName
[30] Fix | Delete
[31] Fix | Delete
to use the feature in question, but may continue to use such imports.
[32] Fix | Delete
[33] Fix | Delete
MandatoryRelease may also be None, meaning that a planned feature got
[34] Fix | Delete
dropped.
[35] Fix | Delete
[36] Fix | Delete
Instances of class _Feature have two corresponding methods,
[37] Fix | Delete
.getOptionalRelease() and .getMandatoryRelease().
[38] Fix | Delete
[39] Fix | Delete
CompilerFlag is the (bitfield) flag that should be passed in the fourth
[40] Fix | Delete
argument to the builtin function compile() to enable the feature in
[41] Fix | Delete
dynamically compiled code. This flag is stored in the .compiler_flag
[42] Fix | Delete
attribute on _Future instances. These values must match the appropriate
[43] Fix | Delete
#defines of CO_xxx flags in Include/compile.h.
[44] Fix | Delete
[45] Fix | Delete
No feature line is ever to be deleted from this file.
[46] Fix | Delete
"""
[47] Fix | Delete
[48] Fix | Delete
all_feature_names = [
[49] Fix | Delete
"nested_scopes",
[50] Fix | Delete
"generators",
[51] Fix | Delete
"division",
[52] Fix | Delete
"absolute_import",
[53] Fix | Delete
"with_statement",
[54] Fix | Delete
"print_function",
[55] Fix | Delete
"unicode_literals",
[56] Fix | Delete
"barry_as_FLUFL",
[57] Fix | Delete
"generator_stop",
[58] Fix | Delete
"annotations",
[59] Fix | Delete
]
[60] Fix | Delete
[61] Fix | Delete
__all__ = ["all_feature_names"] + all_feature_names
[62] Fix | Delete
[63] Fix | Delete
# The CO_xxx symbols are defined here under the same names defined in
[64] Fix | Delete
# code.h and used by compile.h, so that an editor search will find them here.
[65] Fix | Delete
# However, they're not exported in __all__, because they don't really belong to
[66] Fix | Delete
# this module.
[67] Fix | Delete
CO_NESTED = 0x0010 # nested_scopes
[68] Fix | Delete
CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000)
[69] Fix | Delete
CO_FUTURE_DIVISION = 0x20000 # division
[70] Fix | Delete
CO_FUTURE_ABSOLUTE_IMPORT = 0x40000 # perform absolute imports by default
[71] Fix | Delete
CO_FUTURE_WITH_STATEMENT = 0x80000 # with statement
[72] Fix | Delete
CO_FUTURE_PRINT_FUNCTION = 0x100000 # print function
[73] Fix | Delete
CO_FUTURE_UNICODE_LITERALS = 0x200000 # unicode string literals
[74] Fix | Delete
CO_FUTURE_BARRY_AS_BDFL = 0x400000
[75] Fix | Delete
CO_FUTURE_GENERATOR_STOP = 0x800000 # StopIteration becomes RuntimeError in generators
[76] Fix | Delete
CO_FUTURE_ANNOTATIONS = 0x1000000 # annotations become strings at runtime
[77] Fix | Delete
[78] Fix | Delete
[79] Fix | Delete
class _Feature:
[80] Fix | Delete
[81] Fix | Delete
def __init__(self, optionalRelease, mandatoryRelease, compiler_flag):
[82] Fix | Delete
self.optional = optionalRelease
[83] Fix | Delete
self.mandatory = mandatoryRelease
[84] Fix | Delete
self.compiler_flag = compiler_flag
[85] Fix | Delete
[86] Fix | Delete
def getOptionalRelease(self):
[87] Fix | Delete
"""Return first release in which this feature was recognized.
[88] Fix | Delete
[89] Fix | Delete
This is a 5-tuple, of the same form as sys.version_info.
[90] Fix | Delete
"""
[91] Fix | Delete
return self.optional
[92] Fix | Delete
[93] Fix | Delete
def getMandatoryRelease(self):
[94] Fix | Delete
"""Return release in which this feature will become mandatory.
[95] Fix | Delete
[96] Fix | Delete
This is a 5-tuple, of the same form as sys.version_info, or, if
[97] Fix | Delete
the feature was dropped, is None.
[98] Fix | Delete
"""
[99] Fix | Delete
return self.mandatory
[100] Fix | Delete
[101] Fix | Delete
def __repr__(self):
[102] Fix | Delete
return "_Feature" + repr((self.optional,
[103] Fix | Delete
self.mandatory,
[104] Fix | Delete
self.compiler_flag))
[105] Fix | Delete
[106] Fix | Delete
[107] Fix | Delete
nested_scopes = _Feature((2, 1, 0, "beta", 1),
[108] Fix | Delete
(2, 2, 0, "alpha", 0),
[109] Fix | Delete
CO_NESTED)
[110] Fix | Delete
[111] Fix | Delete
generators = _Feature((2, 2, 0, "alpha", 1),
[112] Fix | Delete
(2, 3, 0, "final", 0),
[113] Fix | Delete
CO_GENERATOR_ALLOWED)
[114] Fix | Delete
[115] Fix | Delete
division = _Feature((2, 2, 0, "alpha", 2),
[116] Fix | Delete
(3, 0, 0, "alpha", 0),
[117] Fix | Delete
CO_FUTURE_DIVISION)
[118] Fix | Delete
[119] Fix | Delete
absolute_import = _Feature((2, 5, 0, "alpha", 1),
[120] Fix | Delete
(3, 0, 0, "alpha", 0),
[121] Fix | Delete
CO_FUTURE_ABSOLUTE_IMPORT)
[122] Fix | Delete
[123] Fix | Delete
with_statement = _Feature((2, 5, 0, "alpha", 1),
[124] Fix | Delete
(2, 6, 0, "alpha", 0),
[125] Fix | Delete
CO_FUTURE_WITH_STATEMENT)
[126] Fix | Delete
[127] Fix | Delete
print_function = _Feature((2, 6, 0, "alpha", 2),
[128] Fix | Delete
(3, 0, 0, "alpha", 0),
[129] Fix | Delete
CO_FUTURE_PRINT_FUNCTION)
[130] Fix | Delete
[131] Fix | Delete
unicode_literals = _Feature((2, 6, 0, "alpha", 2),
[132] Fix | Delete
(3, 0, 0, "alpha", 0),
[133] Fix | Delete
CO_FUTURE_UNICODE_LITERALS)
[134] Fix | Delete
[135] Fix | Delete
barry_as_FLUFL = _Feature((3, 1, 0, "alpha", 2),
[136] Fix | Delete
(4, 0, 0, "alpha", 0),
[137] Fix | Delete
CO_FUTURE_BARRY_AS_BDFL)
[138] Fix | Delete
[139] Fix | Delete
generator_stop = _Feature((3, 5, 0, "beta", 1),
[140] Fix | Delete
(3, 7, 0, "alpha", 0),
[141] Fix | Delete
CO_FUTURE_GENERATOR_STOP)
[142] Fix | Delete
[143] Fix | Delete
annotations = _Feature((3, 7, 0, "beta", 1),
[144] Fix | Delete
(3, 10, 0, "alpha", 0),
[145] Fix | Delete
CO_FUTURE_ANNOTATIONS)
[146] Fix | Delete
[147] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function