[Python-ideas] Debugging: some problems and possible solutions
jfine2358 at gmail.com
Wed Oct 3 10:51:43 EDT 2018
This thread is about debugging. I suggest we start by collecting
problems and possible solutions. And that after about a week of that,
we start discussing what we've gathered.
We already have a problem and possible solution, provided by Eric
Smith and Larry Hastings.
TITLE: f-string "debug" conversion
print('value = ', value)
is tedious, particularly for more complicated expressions, such as
print('big_array[5:20] =', big_array[5:20])
For f-strings, we add a !d conversion operator, which produces the
text of an expression followed by its value. Thus, the two previous
examples can be written more concisely as
I suggest for the moment that we just gather problem-solution pairs,
much as above. I think they'll be between 5 and 15 such pairs. I'll
post one to the current discussion thread in an hour or so.
And that after about a week, we move to discussing what we have.
Finally, many thanks to Eric and Larry for their useful contribution
to the important problem of debugging.
More information about the Python-ideas