Irit Katriel <iritkatr...@yahoo.com> added the comment:
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. ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33809> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com