Skip to content

Add an example of ArgumentParser.exit() #82089

Closed

Description

@shihai1991
BPO 37908
Nosy @matrixise, @miss-islington, @shihai1991
PRs
  • bpo-37908: Add an example of ArgumentParser.exit() #15455
  • [3.8] bpo-37908: Add an example of ArgumentParser.exit() (GH-15455) #16065
  • 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-12.15:56:25.822>
    created_at = <Date 2019-08-21.17:11:33.473>
    labels = ['docs', '3.8', '3.9', 'performance']
    title = 'Add an example of ArgumentParser.exit()'
    updated_at = <Date 2019-09-12.15:56:25.821>
    user = 'https://github.com/shihai1991'

    bugs.python.org fields:

    activity = <Date 2019-09-12.15:56:25.821>
    actor = 'matrixise'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-09-12.15:56:25.822>
    closer = 'matrixise'
    components = ['Documentation']
    creation = <Date 2019-08-21.17:11:33.473>
    creator = 'shihai1991'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37908
    keywords = ['patch']
    message_count = 6.0
    messages = ['350097', '350098', '350360', '352202', '352204', '352207']
    nosy_count = 6.0
    nosy_names = ['bethard', 'docs@python', 'paul.j3', 'matrixise', 'miss-islington', 'shihai1991']
    pr_nums = ['15455', '16065']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue37908'
    versions = ['Python 3.8', 'Python 3.9']

    Activity

    1. shihai1991 commented on Aug 21, 2019

      @shihai1991
      MemberAuthor

      As paul said in bpo-9938:
      The exit and error methods are mentioned in the 3.4 documentation, but there are no examples of modifying them.

      16.4.5.9. Exiting methods
      ArgumentParser.exit(status=0, message=None)
      ArgumentParser.error(message)
      

      I will update the examples in this weekend.

    2. shihai1991 commented on Aug 21, 2019

      @shihai1991
      MemberAuthor
    3. shihai1991 commented on Aug 24, 2019

      @shihai1991
      MemberAuthor

      Adding an example of ArgumentParser.exit(), because some user would like cathing errors manually or consider exit progress or not when an error occurs.

      I have not add example of ArgumentParser.error(), because i can not think some user scenarios:(

    4. changed the title [-]Add some examples of ArgumentParser.exit()[/-] [+]Add an example of ArgumentParser.exit()[/+] on Aug 24, 2019
    5. matrixise commented on Sep 12, 2019

      @matrixise
      Member

      New changeset b1a2abd by Stéphane Wirtel (Hai Shi) in branch 'master':
      bpo-37908: Add an example of ArgumentParser.exit() (GH-15455)
      b1a2abd

    6. miss-islington commented on Sep 12, 2019

      @miss-islington
      Contributor

      New changeset 6dc3e61 by Miss Islington (bot) in branch '3.8':
      bpo-37908: Add an example of ArgumentParser.exit() (GH-15455)
      6dc3e61

    7. matrixise commented on Sep 12, 2019

      @matrixise
      Member

      Thank you

    8. 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

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of life3.9 (EOL)end of lifedocsDocumentation in the Doc dirperformancePerformance or resource usage

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions