Skip to content

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

Closed

Description

@serhiy-storchaka
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']

    Activity

    1. serhiy-storchaka commented on Apr 19, 2015

      @serhiy-storchaka
      MemberAuthor

      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.

    2. larryhastings commented on Apr 19, 2015

      @larryhastings
      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.

    3. serhiy-storchaka commented on Apr 20, 2015

      @serhiy-storchaka
      MemberAuthor

      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.

    4. python-dev commented on Apr 23, 2015

      python-devmannequin
      Mannequin

      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

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions