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

dis.disco()/dis.dis() does not show current line correctly with CACHE entries #103046

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@gaogaotiantian

Description

@gaogaotiantian

Now with CACHE entries, thelasti could point to a CACHE entry and current line indicator will be confused.

importdisdeff():print(a)dis.disco(f.__code__,lasti=2)dis.disco(f.__code__,lasti=4)

will display

  3           0 RESUME                   0  4 -->       2 LOAD_GLOBAL              1 (NULL + print)             14 LOAD_GLOBAL              2 (a)             26 PRECALL                  1             30 CALL                     1             40 POP_TOP             42 LOAD_CONST               0 (None)             44 RETURN_VALUE  3           0 RESUME                   0  4           2 LOAD_GLOBAL              1 (NULL + print)             14 LOAD_GLOBAL              2 (a)             26 PRECALL                  1             30 CALL                     1             40 POP_TOP             42 LOAD_CONST               0 (None)             44 RETURN_VALUE

This is confusing for the users because they would probably not realize that there are CACHE entries. And withshow_caches=False, we should show the current line to the instruction that the CACHE belongs to.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp