diff --git a/Lib/pdb.py b/Lib/pdb.py index b897efb6335..63c7c1dd2d7 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -346,6 +346,9 @@ class Pdb(bdb.Bdb, cmd.Cmd): if len(line) >= 3: if (line[:3] == '"""' or line[:3] == "'''"): + if line[-3:] == line[:3]: + # one-line string + continue incomment = line[:3] continue if line[0] != '#': break