66
66
# code.h and used by compile.h, so that an editor search will find them here.
67
67
# However, they're not exported in __all__, because they don't really belong to
68
68
# this module.
69
- CO_NESTED = 0x0010 # nested_scopes
70
- CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000)
71
- CO_FUTURE_DIVISION = 0x20000 # division
72
- CO_FUTURE_ABSOLUTE_IMPORT = 0x40000 # perform absolute imports by default
73
- CO_FUTURE_WITH_STATEMENT = 0x80000 # with statement
74
- CO_FUTURE_PRINT_FUNCTION = 0x100000 # print function
75
- CO_FUTURE_UNICODE_LITERALS = 0x200000 # unicode string literals
69
+ CO_NESTED = 0x0010 # nested_scopes
70
+ CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000)
71
+ CO_FUTURE_DIVISION = 0x20000 # division
72
+ CO_FUTURE_ABSOLUTE_IMPORT = 0x40000 # perform absolute imports by default
73
+ CO_FUTURE_WITH_STATEMENT = 0x80000 # with statement
74
+ CO_FUTURE_PRINT_FUNCTION = 0x100000 # print function
75
+ CO_FUTURE_UNICODE_LITERALS = 0x200000 # unicode string literals
76
76
CO_FUTURE_BARRY_AS_BDFL = 0x400000
77
- CO_FUTURE_GENERATOR_STOP = 0x800000 # StopIteration becomes RuntimeError in generators
78
- CO_FUTURE_ANNOTATIONS = 0x1000000 # annotations become strings at runtime
77
+ CO_FUTURE_GENERATOR_STOP = 0x800000 # StopIteration becomes RuntimeError in generators
78
+ CO_FUTURE_ANNOTATIONS = 0x1000000 # annotations become strings at runtime
79
+
79
80
80
81
class _Feature :
82
+
81
83
def __init__ (self , optionalRelease , mandatoryRelease , compiler_flag ):
82
84
self .optional = optionalRelease
83
85
self .mandatory = mandatoryRelease
@@ -88,7 +90,6 @@ def getOptionalRelease(self):
88
90
89
91
This is a 5-tuple, of the same form as sys.version_info.
90
92
"""
91
-
92
93
return self .optional
93
94
94
95
def getMandatoryRelease (self ):
@@ -97,14 +98,14 @@ def getMandatoryRelease(self):
97
98
This is a 5-tuple, of the same form as sys.version_info, or, if
98
99
the feature was dropped, is None.
99
100
"""
100
-
101
101
return self .mandatory
102
102
103
103
def __repr__ (self ):
104
104
return "_Feature" + repr ((self .optional ,
105
105
self .mandatory ,
106
106
self .compiler_flag ))
107
107
108
+
108
109
nested_scopes = _Feature ((2 , 1 , 0 , "beta" , 1 ),
109
110
(2 , 2 , 0 , "alpha" , 0 ),
110
111
CO_NESTED )
@@ -142,5 +143,5 @@ def __repr__(self):
142
143
CO_FUTURE_GENERATOR_STOP )
143
144
144
145
annotations = _Feature ((3 , 7 , 0 , "beta" , 1 ),
145
- (4 , 0 , 0 , "alpha" , 0 ),
146
+ (3 , 10 , 0 , "alpha" , 0 ),
146
147
CO_FUTURE_ANNOTATIONS )
0 commit comments