[Python-ideas] Should __builtins__ have some kind of pass-through print function, for debugging?
Steven D'Aprano
steve at pearwood.info
Sat Apr 28 07:27:36 EDT 2018
On Fri, Apr 27, 2018 at 06:27:44AM -0700, Eric Fahlgren wrote:
> I've had a 'dprint' in sitecustomize for years. It clones 'print' and adds
> a couple of keyword parameters, 'show_stack' and 'depth', which give
> control over traceback output (walks back up sys._getframe for 'depth'
> entries). It returns the final argument if there is one, otherwise None.
> It can be used anywhere and everywhere that builtin print is used, plus
> anywhere in any expression just passing a single argument.
Is this published anywhere?
--
Steve
More information about the Python-ideas
mailing list