Python Forum
traceback and multi-line statement
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
traceback and multi-line statement
#1
Lightbulb 
IMHO a traceback should show more (within reason) of statements that are spread over multiple lines, and give the line numbers (first to almost last), as well. it currently only shows the first line (with any comments).

what do you think?

want code? here is my test script. you know how to get your own output.
def fun1(ugh):
    xyzzy = 'bar'
    raise ValueError( # comment one
        'oops'
        # comment two
        ' '
        f"foo"

        ' '
        f'{xyzzy} {ugh}'
        )

fun1('xyz')
exit('nope')
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  common form of multi-line text Skaperen 3 2,425 Nov-29-2019, 01:38 PM
Last Post: ichabod801
  traceback reports "wrong" file and line Skaperen 5 2,902 Nov-21-2019, 07:15 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020