@@ -716,7 +716,7 @@ Classes and functions
716716 locals dictionary of the given frame.
717717
718718
719- .. function :: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations])
719+ .. function :: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations[ , formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations] ])
720720
721721 Format a pretty argument spec from the values returned by
722722 :func: `getargspec ` or :func: `getfullargspec `.
@@ -725,7 +725,14 @@ Classes and functions
725725 ``defaults ``, ``kwonlyargs ``, ``kwonlydefaults ``, ``annotations ``). The
726726 other five arguments are the corresponding optional formatting functions
727727 that are called to turn names and values into strings. The last argument
728- is an optional function to format the sequence of arguments.
728+ is an optional function to format the sequence of arguments. For example::
729+
730+ >>> from inspect import formatargspec, getfullargspec
731+ >>> def f(a: int, b: float):
732+ ... pass
733+ ...
734+ >>> formatargspec(*getfullargspec(f))
735+ '(a: int, b: float)'
729736
730737
731738.. function :: formatargvalues(args[, varargs, varkw, locals, formatarg, formatvarargs, formatvarkw, formatvalue])
0 commit comments