@@ -183,7 +183,7 @@ def format(*args, **kwargs):
183183
184184 def vformat (self , format_string , args , kwargs ):
185185 used_args = set ()
186- result = self ._vformat (format_string , args , kwargs , used_args , 2 )
186+ result , _ = self ._vformat (format_string , args , kwargs , used_args , 2 )
187187 self .check_unused_args (used_args , args , kwargs )
188188 return result
189189
@@ -230,14 +230,15 @@ def _vformat(self, format_string, args, kwargs, used_args, recursion_depth,
230230 obj = self .convert_field (obj , conversion )
231231
232232 # expand the format spec, if needed
233- format_spec = self ._vformat (format_spec , args , kwargs ,
234- used_args , recursion_depth - 1 ,
235- auto_arg_index = auto_arg_index )
233+ format_spec , auto_arg_index = self ._vformat (
234+ format_spec , args , kwargs ,
235+ used_args , recursion_depth - 1 ,
236+ auto_arg_index = auto_arg_index )
236237
237238 # format the object and append to the result
238239 result .append (self .format_field (obj , format_spec ))
239240
240- return '' .join (result )
241+ return '' .join (result ), auto_arg_index
241242
242243
243244 def get_value (self , key , args , kwargs ):
0 commit comments