Berker Peksag added the comment:
The documentation you've quoted is for traceback.extract_tb().
traceback.format_tb() documentation only says:
A shorthand for ``format_list(extract_tb(tb, limit))``.
Issue 27910 is about updating the documentation of extract_tb(), format_list(),
and
New submission from Jelle Zijlstra:
The documentation for traceback.format_tb says "Return a list of
“pre-processed” stack trace entries extracted from the traceback object tb. It
is useful for alternate formatting of stack traces. The optional limit argument
has the same meaning as for