MCPcopy Index your code
hub / github.com/python/cpython / print_usage

Method print_usage

Lib/argparse.py:2826–2836  ·  view source on GitHub ↗
(self, file=None)

Source from the content-addressed store, hash-verified

2824 # =====================
2825
2826 def print_usage(self, file=None):
2827 if file is None:
2828 file = _sys.stdout
2829 formatter = self._get_formatter(file=file)
2830 try:
2831 usage_text = self.format_usage(formatter=formatter)
2832 except TypeError:
2833 # Backward compatibility for formatter classes that
2834 # do not accept the 'formatter' keyword argument.
2835 usage_text = self.format_usage()
2836 self._print_message(usage_text, file)
2837
2838 def print_help(self, file=None):
2839 if file is None:

Calls 3

_get_formatterMethod · 0.95
format_usageMethod · 0.95
_print_messageMethod · 0.95