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

Method get_arg

Lib/_pyrepl/reader.py:476–482  ·  view source on GitHub ↗

Return any prefix argument that the user has supplied, returning 'default' if there is None. Defaults to 1.

(self, default: int = 1)

Source from the content-addressed store, hash-verified

474 return len(self.screeninfo) - 1
475
476 def get_arg(self, default: int = 1) -> int:
477 """Return any prefix argument that the user has supplied,
478 returning 'default' if there is None. Defaults to 1.
479 """
480 if self.arg is None:
481 return default
482 return self.arg
483
484 def get_prompt(self, lineno: int, cursor_on_line: bool) -> str:
485 """Return what should be in the left-hand margin for line

Callers 15

doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected