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

Add command-line interface for the ast module #82230

Closed
serhiy-storchaka opened this issue Sep 7, 2019 · 2 comments
Closed

Add command-line interface for the ast module #82230

serhiy-storchaka opened this issue Sep 7, 2019 · 2 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 38049
Nosy @brettcannon, @rhettinger, @benjaminp, @serhiy-storchaka, @1st1
PRs
  • bpo-38049: Add command-line interface for the ast module. #15724
  • Dependencies
  • bpo-37995: Multiline ast.dump()
  • 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 2019-09-09.20:42:56.014>
    created_at = <Date 2019-09-07.09:31:33.173>
    labels = ['type-feature', 'library', '3.9']
    title = 'Add command-line interface for the ast module'
    updated_at = <Date 2019-09-09.20:42:56.013>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2019-09-09.20:42:56.013>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-09-09.20:42:56.014>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2019-09-07.09:31:33.173>
    creator = 'serhiy.storchaka'
    dependencies = ['37995']
    files = []
    hgrepos = []
    issue_num = 38049
    keywords = ['patch']
    message_count = 2.0
    messages = ['351297', '351550']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'rhettinger', 'benjamin.peterson', 'serhiy.storchaka', 'yselivanov']
    pr_nums = ['15724']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue38049'
    versions = ['Python 3.9']

    @serhiy-storchaka
    Copy link
    Member Author

    The proposed PR adds a simple command-line interface to the ast module, similar to CLI of the tokenize and dis modules. It reads the content of a specified file (or stdin), parses it with ast.parse() and outputs the tree with ast.dump().

    It can be used for learning internals of the Python compiler, in addition to tokenize and dis.

    @serhiy-storchaka serhiy-storchaka added 3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Sep 7, 2019
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 832e864 by Serhiy Storchaka in branch 'master':
    bpo-38049: Add command-line interface for the ast module. (GH-15724)
    832e864

    @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.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant