Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dis output for LOAD_CONST is confusing #89331

Closed
iritkatriel opened this issue Sep 10, 2021 · 3 comments
Closed

dis output for LOAD_CONST is confusing #89331

iritkatriel opened this issue Sep 10, 2021 · 3 comments
Labels
3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@iritkatriel
Copy link
Member

BPO 45168
Nosy @gvanrossum, @iritkatriel
PRs
  • bpo-45168: change dis output to omit missing values rather than replacing them by their index #28313
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-09-14.09:11:28.413>
    created_at = <Date 2021-09-10.23:31:01.322>
    labels = ['type-bug', 'library', '3.11']
    title = 'dis output for LOAD_CONST  is confusing'
    updated_at = <Date 2021-09-14.09:11:28.412>
    user = 'https://github.com/iritkatriel'

    bugs.python.org fields:

    activity = <Date 2021-09-14.09:11:28.412>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-09-14.09:11:28.413>
    closer = 'iritkatriel'
    components = ['Library (Lib)']
    creation = <Date 2021-09-10.23:31:01.322>
    creator = 'iritkatriel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45168
    keywords = ['patch']
    message_count = 3.0
    messages = ['401620', '401621', '401764']
    nosy_count = 2.0
    nosy_names = ['gvanrossum', 'iritkatriel']
    pr_nums = ['28313']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45168'
    versions = ['Python 3.11']

    @iritkatriel
    Copy link
    Member Author

    When dis doesn't have co_consts, it just prints the index of the const in () instead. This is both unnecessary and confusing because (1) we already have the index and (2) there is no indication that this is the index and not the value.

    Can we change the output so that it doesn't print the value if it's missing?

    @iritkatriel
    Copy link
    Member Author

    @iritkatriel iritkatriel added stdlib Python modules in the Lib dir 3.11 only security fixes type-bug An unexpected behavior, bug, or error labels Sep 10, 2021
    @iritkatriel iritkatriel changed the title dis output for co_consts is confusing dis output for LOAD_CONST is confusing Sep 10, 2021
    @iritkatriel iritkatriel changed the title dis output for co_consts is confusing dis output for LOAD_CONST is confusing Sep 10, 2021
    @iritkatriel
    Copy link
    Member Author

    New changeset c99fc4e by Irit Katriel in branch 'main':
    bpo-45168: change dis output to omit missing values rather than replacing them by their index (GH-28313)
    c99fc4e

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant