MCPcopy
hub / github.com/tornadoweb/tornado / _get_argument

Method _get_argument

tornado/web.py:581–593  ·  view source on GitHub ↗
(
        self,
        name: str,
        default: Union[None, str, _ArgDefaultMarker],
        source: Dict[str, List[bytes]],
        strip: bool = True,
    )

Source from the content-addressed store, hash-verified

579 return self._get_arguments(name, self.request.query_arguments, strip)
580
581 def _get_argument(
582 self,
583 name: str,
584 default: Union[None, str, _ArgDefaultMarker],
585 source: Dict[str, List[bytes]],
586 strip: bool = True,
587 ) -> Optional[str]:
588 args = self._get_arguments(name, source, strip=strip)
589 if not args:
590 if isinstance(default, _ArgDefaultMarker):
591 raise MissingArgumentError(name)
592 return default
593 return args[-1]
594
595 def _get_arguments(
596 self, name: str, source: Dict[str, List[bytes]], strip: bool = True

Callers 3

get_argumentMethod · 0.95
get_body_argumentMethod · 0.95
get_query_argumentMethod · 0.95

Calls 2

_get_argumentsMethod · 0.95

Tested by

no test coverage detected