@@ -89,38 +89,9 @@ def apply_named(self, vars, body, args, evaluation):
8989 var .get_name () for var in vars ), args [:len (vars )])))
9090 return body .replace_vars (vars )
9191
92- def apply_named_attr (self , vars , body , attr , args , evaluation ):
93- 'Function[vars_, body_, attr_][args___]'
94-
95- ## FIXME: In order to get the proper behaviour, we need
96- ## to take into account the attributes in the evaluation
97- ##
98-
99- print ("Warning: incomplete implementation" )
100- if attr .has_form ('List' , None ):
101- attr = [str (a ) for a in attr .leaves ]
102- else :
103- attr = [str (attr )]
104-
105-
106- if vars .has_form ('List' , None ):
107- vars = vars .leaves
108- else :
109- vars = [vars ]
110-
111-
112- args = args .get_sequence ()
113- if len (vars ) > len (args ):
114- evaluation .message ('Function' , 'fpct' , )
115- else :
116- vars = dict (list (zip ((
117- var .get_name () for var in vars ), args [:len (vars )])))
118- return body .replace_vars (vars )
119-
120-
12192 # Not sure if DRY is possible here...
12293 def apply_named_attr (self , vars , body , attr , args , evaluation ):
123- 'Function[vars_, body_, attr_][args___]'
94+ 'Function[vars_, body_, attr_][args___]'
12495 if vars .has_form ('List' , None ):
12596 vars = vars .leaves
12697 else :
0 commit comments