6666# code.h and used by compile.h, so that an editor search will find them here.
6767# However, they're not exported in __all__, because they don't really belong to
6868# 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
7676CO_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+
7980
8081class _Feature :
82+
8183 def __init__ (self , optionalRelease , mandatoryRelease , compiler_flag ):
8284 self .optional = optionalRelease
8385 self .mandatory = mandatoryRelease
@@ -88,7 +90,6 @@ def getOptionalRelease(self):
8890
8991 This is a 5-tuple, of the same form as sys.version_info.
9092 """
91-
9293 return self .optional
9394
9495 def getMandatoryRelease (self ):
@@ -97,14 +98,14 @@ def getMandatoryRelease(self):
9798 This is a 5-tuple, of the same form as sys.version_info, or, if
9899 the feature was dropped, is None.
99100 """
100-
101101 return self .mandatory
102102
103103 def __repr__ (self ):
104104 return "_Feature" + repr ((self .optional ,
105105 self .mandatory ,
106106 self .compiler_flag ))
107107
108+
108109nested_scopes = _Feature ((2 , 1 , 0 , "beta" , 1 ),
109110 (2 , 2 , 0 , "alpha" , 0 ),
110111 CO_NESTED )
@@ -142,5 +143,5 @@ def __repr__(self):
142143 CO_FUTURE_GENERATOR_STOP )
143144
144145annotations = _Feature ((3 , 7 , 0 , "beta" , 1 ),
145- (4 , 0 , 0 , "alpha" , 0 ),
146+ (3 , 10 , 0 , "alpha" , 0 ),
146147 CO_FUTURE_ANNOTATIONS )
0 commit comments