Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 16562f1

Browse filesBrowse files
authored
Document getopt and gnu_getopt longopts argument as string (#153976)
Document getopt and gnu_getopt longopts as string
1 parent e260051 commit 16562f1
Copy full SHA for 16562f1

1 file changed

+2Lines changed: 2 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Doc/library/getopt.rst‎

Copy file name to clipboardExpand all lines: Doc/library/getopt.rst
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ exception:
6262
option ``--fo`` will match as ``--foo``, but ``--f`` will
6363
not match uniquely, so :exc:`GetoptError` will be raised.
6464

65+
If *longopts* is a string it gets treated as a list of a single element.
66+
6567
The return value consists of two elements: the first is a list of ``(option,
6668
value)`` pairs; the second is the list of program arguments left after the
6769
option list was stripped (this is a trailing slice of *args*). Each

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.