#NEWLINE# @ staticmethod #NEWLINE# def _computeSubchainAndTerminalValueAlongModules( rootValue , chainWithPosition ) : #NEWLINE# #INDENT# ix = 1 #NEWLINE# chain = chainWithPosition . var #NEWLINE# position = chainWithPosition . pos #NEWLINE# ( subchain , terminalValue ) = ( chain [ : ix ] , rootValue ) #NEWLINE# while PyforaInspect . ismodule ( terminalValue ) : #NEWLINE# #INDENT# if ( ix >= len ( chain ) ) : #NEWLINE# #INDENT# terminalValue = _Unconvertible ( ) #NEWLINE# break #NEWLINE# #UNINDENT# if ( not hasattr ( terminalValue , chain [ ix ] ) ) : #NEWLINE# #INDENT# raise Exceptions . PythonToForaConversionError ( ( 'Module %s has no member %s' % ( str ( terminalValue ) , chain [ ix ] ) ) ) #NEWLINE# #UNINDENT# terminalValue = getattr ( terminalValue , chain [ ix ] ) #NEWLINE# ix += 1 #NEWLINE# subchain = chain [ : ix ] #NEWLINE# #UNINDENT# return ( subchain , terminalValue , position )