Skip to content

Write PyArg_Parse* format in a line with a function #68195

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

Closed
serhiy-storchaka opened this issue Apr 19, 2015 · 4 comments
Closed

Write PyArg_Parse* format in a line with a function #68195

serhiy-storchaka opened this issue Apr 19, 2015 · 4 comments
Assignees
Labels
topic-argument-clinic type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 24007
Nosy @larryhastings, @serhiy-storchaka
Files
  • clinic_format_argument.patch
  • 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 = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2015-04-23.21:41:55.626>
    created_at = <Date 2015-04-19.18:30:47.696>
    labels = ['type-feature', 'expert-argument-clinic']
    title = 'Write PyArg_Parse* format in a line with a function'
    updated_at = <Date 2015-04-23.21:41:55.625>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2015-04-23.21:41:55.625>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2015-04-23.21:41:55.626>
    closer = 'serhiy.storchaka'
    components = ['Demos and Tools', 'Argument Clinic']
    creation = <Date 2015-04-19.18:30:47.696>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['39121']
    hgrepos = []
    issue_num = 24007
    keywords = ['patch']
    message_count = 4.0
    messages = ['241531', '241567', '241607', '241893']
    nosy_count = 3.0
    nosy_names = ['larry', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue24007'
    versions = ['Python 3.5']

    @serhiy-storchaka
    Copy link
    Member Author

    Proposed patch makes Argument Clinic to output format argument of PyArg_Parse, PyArg_ParseTuple and PyArg_ParseTupleAndKeywords in a line with a function itself. First, this makes generated code more compact and easier to read and compare with old code. Second, it makes easier to grep sources for used format units. Format argument always (or almost always) is written in a line with a function.

    @serhiy-storchaka serhiy-storchaka added topic-argument-clinic type-feature A feature request or enhancement labels Apr 19, 2015
    @larryhastings
    Copy link
    Contributor

    I don't care about this, but the patch looks fine. If this really helps then LGTM.

    Please hold off checking this in until after 3.5.0 alpha 4 is released.

    @serhiy-storchaka
    Copy link
    Member Author

    Actually it is not hard to me to apply the patch locally and regenerate clinic output if I need it. I propose this patch for mainstream only because think that it can be helpful for someone other. Thanks to moving all generated code into separated files, the code churn does not harm.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 23, 2015

    New changeset 151cab576cab by Serhiy Storchaka in branch 'default':
    Issue bpo-24007: Argument Clinic now writes the format of PyArg_Parse*() at the
    https://hg.python.org/cpython/rev/151cab576cab

    @serhiy-storchaka serhiy-storchaka self-assigned this Apr 23, 2015
    @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
    topic-argument-clinic type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants