Skip to content

gh-134082: Modernize docstrings in ArgumentParser.parse_known_intermixed_args #134096

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
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Lib/argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2562,13 +2562,13 @@ def parse_intermixed_args(self, args=None, namespace=None):
return args

def parse_known_intermixed_args(self, args=None, namespace=None):
# returns a namespace and list of extras
#
# positional can be freely intermixed with optionals. optionals are
# first parsed with all positional arguments deactivated. The 'extras'
# are then parsed. If the parser definition is incompatible with the
# intermixed assumptions (e.g. use of REMAINDER, subparsers) a
# TypeError is raised.
"""
Return a namespace and list of extras positional can be freely
intermixed with optionals. Optionals are first parsed with all
positional arguments deactivated. The 'extras' are then parsed.
If the parser definition is incompatible with the intermixed
assumptions (e.g. use of REMAINDER, subparsers) a TypeError is raised.
"""

positionals = self._get_positional_actions()
a = [action for action in positionals
Expand Down
Loading