POS_AUTO¶
-
FormatOpt.
POS_AUTO
= 'force_pos'¶ First attempt to format using
*args
whitelisted informat_args
, if that causes a KeyError/IndexError, then pass kwarg values in the order they’re listed informat_args
(only includes kwarg names listed informat_args
)# def func(x, y) func(‘a’, ‘b’) # assuming 0 and 1 are in format_args, then it would use .format(‘a’, ‘b’) func(y=’b’, x=’a’) # assuming format_args =
['x','y']
, then it would use .format(‘a’, ‘b’)