homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JelleZijlstra
Recipients JelleZijlstra, docs@python
Date 2017年07月21日.15:32:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1500651170.07.0.787106480078.issue30984@psf.upfronthosting.co.za>
In-reply-to
Content
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 print_tb(). A "pre-processed" stack trace entry is a 4-tuple (filename, line number, function name, text) representing the information that is usually printed for a stack trace."
However, as of 3.5 it actually returns a StackSummary object, which is a subclass of list and contains FrameSummary objects. FrameSummary objects are not tuples. The documentation is accurate for 3.4 and earlier. I'm surprised this change was made because it seems like a compatibility break, but it's too late to do something about that now.
The documentation should be changed to correct the return value and add a "versionchanged: 3.5" note.
History
Date User Action Args
2017年07月21日 15:32:50JelleZijlstrasetrecipients: + JelleZijlstra, docs@python
2017年07月21日 15:32:50JelleZijlstrasetmessageid: <1500651170.07.0.787106480078.issue30984@psf.upfronthosting.co.za>
2017年07月21日 15:32:50JelleZijlstralinkissue30984 messages
2017年07月21日 15:32:49JelleZijlstracreate

AltStyle によって変換されたページ (->オリジナル) /