<s> """<STR_LIT>""" <EOL> from nuitka . PythonVersions import python_version <EOL> from . Checkers import checkStatementsSequenceOrNone <EOL> from . FunctionNodes import ExpressionFunctionBodyBase <EOL> from . IndicatorMixins import ( <EOL> MarkLocalsDictIndicator , <EOL> MarkUnoptimizedFunctionIndicator <EOL> ) <EOL> from . NodeBases import ChildrenHavingMixin , ExpressionChildrenHavingBase <EOL> from . ReturnNodes import StatementReturn <EOL> class ExpressionMakeGeneratorObject ( ExpressionChildrenHavingBase ) : <EOL> kind = "<STR_LIT>" <EOL> named_children = ( <EOL> "<STR_LIT>" , <EOL> ) <EOL> getGeneratorRef = ExpressionChildrenHavingBase . childGetter ( "<STR_LIT>" ) <EOL> def __init__ ( self , generator_ref , code_object , source_ref ) : <EOL> assert generator_ref . getFunctionBody ( ) . isExpressionGeneratorObjectBody ( ) <EOL> ExpressionChildrenHavingBase . __init__ ( <EOL> self , <EOL> values = { <EOL> "<STR_LIT>" : generator_ref , <EOL> } , <EOL> source_ref = source_ref <EOL> ) <EOL> self . code_object = code_object <EOL> def getDetails ( self ) : <EOL> return { <EOL> "<STR_LIT>" : self . code_object <EOL> } <EOL> def getCodeObject ( self ) : <EOL> return self . code_object <EOL> def computeExpression ( self , constraint_collection ) : <EOL> return self , None , None <EOL> def mayRaiseException ( self , exception_type ) : <EOL> return False <EOL> def mayHaveSideEffects ( self ) : <EOL> return False <EOL> class ExpressionGeneratorObjectBody ( ExpressionFunctionBodyBase , <EOL> MarkLocalsDictIndicator , <EOL> MarkUnoptimizedFunctionIndicator ) : <EOL> kind = "<STR_LIT>" <EOL> named_children = ( <EOL> "<STR_LIT:body>" , <EOL> ) <EOL> checkers = { <EOL> "<STR_LIT:body>" : checkStatementsSequenceOrNone <EOL> } <EOL> if python_version >= <NUM_LIT> : <EOL> qualname_setup = None <EOL> def __init__ ( self , provider , name , flags , source_ref ) : <EOL> ExpressionFunctionBodyBase . __init__ ( <EOL> self , <EOL> provider = provider , <EOL> name = name , <EOL> is_class = False , <EOL> code_prefix = "<STR_LIT>" if name == "<STR_LIT>" else "<STR_LIT>" , <EOL> flags = flags , <EOL> source_ref = source_ref <EOL> ) <EOL> MarkLocalsDictIndicator . __init__ ( self ) <EOL> MarkUnoptimizedFunctionIndicator . __init__ ( self ) <EOL> self . needs_generator_return_exit = False <EOL> def getFunctionName ( self ) : <EOL> return self . name <EOL> def getFunctionQualname ( self ) : <EOL> return self . getParentVariableProvider ( ) . getFunctionQualname ( ) <EOL> def markAsNeedsGeneratorReturnHandling ( self , value ) : <EOL> self . needs_generator_return_exit = max ( <EOL> self . needs_generator_return_exit , <EOL> value <EOL> ) <EOL> def needsGeneratorReturnHandling ( self ) : <EOL> return self . needs_generator_return_exit == <NUM_LIT:2> <EOL> def needsGeneratorReturnExit ( self ) : <EOL> return bool ( self . needs_generator_return_exit ) <EOL> @ staticmethod <EOL> def needsCreation ( ) : <EOL> return False <EOL> getBody = ChildrenHavingMixin . childGetter ( "<STR_LIT:body>" ) <EOL> setBody = ChildrenHavingMixin . childSetter ( "<STR_LIT:body>" ) <EOL> class StatementGeneratorReturn ( StatementReturn ) : <EOL> kind = "<STR_LIT>" <EOL> def __init__ ( self , expression , source_ref ) : <EOL> StatementReturn . __init__ ( <EOL> self , <EOL> expression = expression , <EOL> source_ref = source_ref <EOL> ) </s>
