class Param[A]
A tree of params parsing an A.
Attributes#
| Attribute | Type | Description |
|---|---|---|
kind | Kind |
Functions#
parse#
parse(args) -> Parsed[A]| Parameter | Type | Description |
|---|---|---|
args | ParsedArgs |
Returns Parsed[A]
@abstractmethod
def parse(self, args: ParsedArgs) -> Parsed[A]: ...map_singles#
map_singles(f) -> Param[A]This tree with every Single in it replaced by f's.
| Parameter | Type | Description |
|---|---|---|
f | Callable[[Single[Any]], Single[Any]] |
Returns Param[A]
@abstractmethod
def map_singles(self, f: Callable[[Single[Any]], Single[Any]]) -> Param[A]:
"""This tree with every ``Single`` in it replaced by ``f``'s."""singles#
singles() -> list[Single[Any]]Every Single in the tree, alternatives included, in order.
Returns list[Single[Any]]
@abstractmethod
def singles(self) -> list[Single[Any]]:
"""Every ``Single`` in the tree, alternatives included, in order."""metadata#
metadata() -> ParamMetadataWhether the tree is optional or variadic, and its bounds.
Returns ParamMetadata
@abstractmethod
def metadata(self) -> ParamMetadata:
"""Whether the tree is optional or variadic, and its bounds."""