Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Improve the error message forassert andAssertionError by adding location information #105724

Open
Assignees
sobolevn
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement
@sobolevn

Description

@sobolevn

Feature or enhancement

Right nowassert generate errors that are hard to read, mostly because they lack context.
Example:

>>>assert1==0Traceback (mostrecentcalllast):File"<stdin>",line1,in<module>AssertionError

Pitch

Let's make them better:

>>>assert1==0Traceback (mostrecentcalllast):File"<stdin>",line1,in<module>assert1==0^^^^^^AssertionError

This is a good starting point.

Later this can be enhanced to use more context.

Linked PRs

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp