[New-bugs-announce] [issue39316] settrace skips lines when chaining methods without arguments

Alex Hall report at bugs.python.org
Sun Jan 12 16:13:44 EST 2020


New submission from Alex Hall <alex.mojaki at gmail.com>:

When stepping through a multiline expression like this:

```
print(slug
      .replace("_", " ")
      .title()
      .upper()
      .replace("a", "b")
      .lower()
      .replace("The ", "the "))
```

only these lines are hit by the tracer function:

15 print(slug
16       .replace("_", " ")
19       .replace("a", "b")
21       .replace("The ", "the "))

I'm guessing the problem is that there are no expressions on the other lines, as the attributes and calls all start with slug.

----------
components: Interpreter Core
files: trace_skipping_lines_bug.py
messages: 359878
nosy: alexmojaki
priority: normal
severity: normal
status: open
title: settrace skips lines when chaining methods without arguments
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48837/trace_skipping_lines_bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39316>
_______________________________________


More information about the New-bugs-announce mailing list