[Python-ideas] Debugging: some problems and possible solutions

Jonathan Fine jfine2358 at gmail.com
Sat Oct 6 07:20:16 EDT 2018

Samuel Colvin wrote:

> Python definitely needs a dedicated debug print command.

> I've built python devtools with has such a command:
> https://github.com/samuelcolvin/python-devtools

> Is this the kind of thing you were thinking about?

Thank you for this comment, Samuel. And also very much for your work
on devtools.

To answer your question: Yes, and No.

I'm thinking of providing a builtin debug() command that 'does the
right thing' according to the context. And the context would include
the user's preferences. Which might be to use the print command in
your devtools package.

But the user might be in an IDE, which provides a separate window for
the debug output.

I suggest the builtin debug() would determine the API, and provide a
reference implementation. And that many users (perhaps through their
IDE) would choose a different implementation.

More information about the Python-ideas mailing list