#NEWLINE# def _partition_args( self , args ) : #NEWLINE# #INDENT# 'Group function arguments into categories.' #NEWLINE# py_args = [ ] #NEWLINE# py_returns = [ ] #NEWLINE# py_locals = [ ] #NEWLINE# py_inferred = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for arg in args : #NEWLINE# #INDENT# if isinstance ( arg , OutputArgument ) : #NEWLINE# #INDENT# py_returns . append ( arg ) #NEWLINE# py_locals . append ( arg ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( arg , InOutArgument ) : #NEWLINE# #INDENT# py_returns . append ( arg ) #NEWLINE# py_args . append ( arg ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# py_args . append ( arg ) #NEWLINE# #UNINDENT# #UNINDENT# if ( isinstance ( arg , ( InputArgument , InOutArgument ) ) and arg . dimensions ) : #NEWLINE# #INDENT# dims = [ ( d [ 1 ] + 1 ) for d in arg . dimensions ] #NEWLINE# sym_dims = [ ( i , d ) for ( i , d ) in enumerate ( dims ) if isinstance ( d , Symbol ) ] #NEWLINE# for ( i , d ) in self : #NEWLINE# #INDENT# py_inferred [ d ] = ( arg . name , i ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for arg in args : #NEWLINE# #INDENT# if ( arg . name in py_inferred ) : #NEWLINE# #INDENT# py_inferred [ arg ] = py_inferred . pop ( arg . name ) #NEWLINE# #UNINDENT# #UNINDENT# py_args = [ a for a in py_args if ( a not in py_inferred ) ] #NEWLINE# return ( py_returns , py_args , py_locals , py_inferred )