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

Chris Angelico rosuav at gmail.com
Wed Oct 3 11:33:28 EDT 2018


On Thu, Oct 4, 2018 at 1:30 AM Jonathan Fine <jfine2358 at gmail.com> wrote:
>
> Chris Angelico wrote:
>
> > Why not just discuss each proposal on its own merits, independently of
> > any other proposals? Do they interact with each other?
>
> Good question. I think they will interact. Not in terms of
> implementation, but in terms of benefit. To quote the Zen of Python:
>
> > There should be one-- and preferably only one --obvious way to do it.
> > Although that way may not be obvious at first unless you're Dutch.
>
> However, we won't know for sure until the proposals are in.

Debugging is a massively broad area, and we commonly have and use
multiple completely different tools. Let's not start assuming that
proposals will interact or conflict until we actually have some that
do.

Your proposal for __debug__ to be able to have integer values seems
like something that should be discussed in more detail, independently
of exactly what the debugging code governed by it ends up doing. If
you do "if __debug__>2: print(f'{blah!d}')", it'd use two different
proposals, but they're completely orthogonal.

ChrisA


More information about the Python-ideas mailing list