Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue37726

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Tutorial should not recommend getopt
Type:Stage:resolved
Components:DocumentationVersions:Python 3.9, Python 3.8, Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: docs@pythonNosy List: docs@python, gvanrossum, mental
Priority:normalKeywords:newcomer friendly, patch

Created on2019-07-31 04:18 bygvanrossum, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 15052mergedmental,2019-07-31 11:09
PR 15069mergedmiss-islington,2019-08-01 14:19
PR 15070mergedmiss-islington,2019-08-01 14:19
Messages (6)
msg348774 -(view)Author: Guido van Rossum (gvanrossum)*(Python committer)Date: 2019-07-31 04:18
I read on python-ideas that the tutorial recommends getopt as the simple argument parsing choice, and argparse as advanced. This is silly. We should only promote argparse (unless you want to use raw sys.argv[1:]).
msg348797 -(view)Author: (mental)*Date: 2019-07-31 11:09
It's nice to see the newcomer friendly tag being encouraged :thumbsup:I'm submitting a PR for a doc change (I'd appreciate a review :D).I've replaced any mention of getopt in the tutorial section with the argparse module. Additionally I have added several small examples of usage promoting its usability.Should the section recommend using other dedicated packages for parsing: fire, click, docopt? urllib.request does this for the requests package.
msg348856 -(view)Author: Guido van Rossum (gvanrossum)*(Python committer)Date: 2019-08-01 14:17
New changeset2491134029b195d3159a489e1803ee22a7839b41 by Guido van Rossum (mental) in branch 'master':bpo-37726: Prefer argparse over getopt in stdlib tutorial (#15052)https://github.com/python/cpython/commit/2491134029b195d3159a489e1803ee22a7839b41
msg348857 -(view)Author: Guido van Rossum (gvanrossum)*(Python committer)Date: 2019-08-01 14:35
New changesetdcc53ebbff384076b0763c1f842966c189417071 by Guido van Rossum (Miss Islington (bot)) in branch '3.8':bpo-37726: Prefer argparse over getopt in stdlib tutorial (GH-15052) (#15070)https://github.com/python/cpython/commit/dcc53ebbff384076b0763c1f842966c189417071
msg348858 -(view)Author: Guido van Rossum (gvanrossum)*(Python committer)Date: 2019-08-01 14:35
New changeset8990ac0ab0398bfb9c62031288030fe7c630c2c7 by Guido van Rossum (Miss Islington (bot)) in branch '3.7':bpo-37726: Prefer argparse over getopt in stdlib tutorial (GH-15052) (#15069)https://github.com/python/cpython/commit/8990ac0ab0398bfb9c62031288030fe7c630c2c7
msg348859 -(view)Author: Guido van Rossum (gvanrossum)*(Python committer)Date: 2019-08-01 14:36
Thanks mental! All done.
History
DateUserActionArgs
2022-04-11 14:59:18adminsetgithub: 81907
2019-08-01 14:36:53gvanrossumsetversions: - Python 2.7
2019-08-01 14:36:25gvanrossumsetstatus: open -> closed
resolution: fixed
messages: +msg348859

stage: patch review -> resolved
2019-08-01 14:35:23gvanrossumsetmessages: +msg348858
2019-08-01 14:35:04gvanrossumsetmessages: +msg348857
2019-08-01 14:19:15miss-islingtonsetpull_requests: +pull_request14817
2019-08-01 14:19:06miss-islingtonsetpull_requests: +pull_request14816
2019-08-01 14:17:57gvanrossumsetmessages: +msg348856
2019-07-31 11:09:40mentalsetkeywords: +patch
stage: needs patch -> patch review
pull_requests: +pull_request14802
2019-07-31 11:09:29mentalsetnosy: +mental
messages: +msg348797
2019-07-31 04:18:10gvanrossumcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp