#NEWLINE# def set_arg_types( self , argspec , arg_types ) : #NEWLINE# #INDENT# ( args , varargs , keywords , defaults ) = argspec #NEWLINE# if ( args [ 0 ] == 'self' ) : #NEWLINE# #INDENT# args = args [ 1 : ] #NEWLINE# #UNINDENT# arg_types = list ( arg_types ) #NEWLINE# if ( self . body_type is not None ) : #NEWLINE# #INDENT# arg_types . append ( self . body_type ) #NEWLINE# #UNINDENT# for ( i , argname ) in enumerate ( args ) : #NEWLINE# #INDENT# datatype = arg_types [ i ] #NEWLINE# mandatory = ( ( defaults is None ) or ( i < ( len ( args ) - len ( defaults ) ) ) ) #NEWLINE# default = None #NEWLINE# if ( not mandatory ) : #NEWLINE# #INDENT# default = defaults [ ( i - ( len ( args ) - len ( defaults ) ) ) ] #NEWLINE# #UNINDENT# if ( datatype is wsme . types . HostRequest ) : #NEWLINE# #INDENT# self . pass_request = argname #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . arguments . append ( FunctionArgument ( argname , datatype , mandatory , default ) )