Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ set_defaults
Method
set_defaults
Lib/optparse.py:1287–1288 ·
view source on GitHub ↗
(self, **kwargs)
Source
from the content-addressed store, hash-verified
1285
self.defaults[dest] = value
1286
1287
def
set_defaults(self, **kwargs):
1288
self.defaults.update(kwargs)
1289
1290
def
_get_all_options(self):
1291
options = self.option_list[:]
Callers
15
_add_format_options
Function · 0.45
test_set_defaults_no_args
Method · 0.45
test_set_defaults_with_args
Method · 0.45
test_set_defaults_subparsers
Method · 0.45
test_set_defaults_parents
Method · 0.45
test_set_defaults_on_parent_and_subparser
Method · 0.45
test_set_defaults_same_as_add_argument
Method · 0.45
test_set_defaults_same_as_add_argument_group
Method · 0.45
test_get_default
Method · 0.45
test_mixed_defaults_post
Method · 0.45
test_mixed_defaults_pre
Method · 0.45
test_process_default
Method · 0.45
Calls
1
update
Method · 0.45
Tested by
14
test_set_defaults_no_args
Method · 0.36
test_set_defaults_with_args
Method · 0.36
test_set_defaults_subparsers
Method · 0.36
test_set_defaults_parents
Method · 0.36
test_set_defaults_on_parent_and_subparser
Method · 0.36
test_set_defaults_same_as_add_argument
Method · 0.36
test_set_defaults_same_as_add_argument_group
Method · 0.36
test_get_default
Method · 0.36
test_mixed_defaults_post
Method · 0.36
test_mixed_defaults_pre
Method · 0.36
test_process_default
Method · 0.36
test_parser_default_2
Method · 0.36