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 iritkatriel
Recipients fhackdroid, iritkatriel, r.david.murray, ulope
Date 2021-01-15.11:24:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610709899.06.0.0137217392145.issue33809@roundup.psfhosted.org>
In-reply-to
Content
Generally speaking, I don't think it's a good idea to create redundant APIs. If we copy all the params from TracebackException (and it will be all params, why only this one?) that means more code, more tests, more documentation and a higher cognitive load for someone reading the documentation to learn the API.  And the users don't really get anything tangible in return - they can do exactly the same things, maybe with a slightly smaller number of characters.  A good standard library API has a small number of buttons that can be used in combination to get a lot of functionality.

In this particular case, I think it's nice that print_exception() gives novices a simple way to get some basic functionality, and more sophisticated users can go to TracebackException for more options. I agree with you that at the moment it's a bit clumsy, and a print() method would make it more usable. Note that a programmer who understands the different parts of a traceback and wants to tweak its representation is not a novice and should be able to use that with ease.
History
Date User Action Args
2021-01-15 11:24:59iritkatrielsetrecipients: + iritkatriel, r.david.murray, ulope, fhackdroid
2021-01-15 11:24:59iritkatrielsetmessageid: <1610709899.06.0.0137217392145.issue33809@roundup.psfhosted.org>
2021-01-15 11:24:59iritkatriellinkissue33809 messages
2021-01-15 11:24:58iritkatrielcreate