Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Wrong error location in traceback inside an assert #116034

Copy link
Copy link
Closed
@solanav

Description

@solanav
Issue body actions

Bug report

Bug description:

The location in the traceback for this failed assertion:

test = 3
assert test == 1 and test == 2, "Bug found?"

Seems to be wrong. It should show test == 1 as the source of the error:

Traceback (most recent call last):
  File "/home/.../test.py", line 3, in <module>
    assert test == 1 and test == 2, "Bug found?"
                         ^^^^^^^^^
AssertionError: Bug found?

CPython versions tested on:

3.11

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

Labels

type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.