ArgumentRecord
Wrapper for an ast.arg
node.
Handsdown API Index / Handsdown / AST Parser / Node Records / ArgumentRecord
Auto-generated documentation for handsdown.ast_parser.node_records.argument_record module.
ArgumentRecord
Show source in argument_record.py:13
Wrapper for an ast.arg
node.
Arguments
node
- AST node.name
- Argument name.type_hint
- Argument type hint.prefix
- Prefix for arguemnt name, used for starargs.
Signature
class ArgumentRecord(NodeRecord):
def __init__(
self,
node: ast.arg,
name: str,
type_hint: Optional[ast.expr] = None,
prefix: str = "",
) -> None:
...
See also
ArgumentRecord().default
Show source in argument_record.py:39
Default value of the argument.
Returns
Default exression or None.
Signature
See also
ArgumentRecord().related_names
Show source in argument_record.py:71
Set of related names.
Signature
ArgumentRecord().required
Show source in argument_record.py:49
Whether the argument is required.
Returns
True if required, False otherwise.
Signature
ArgumentRecord().set_default
Show source in argument_record.py:59
Set default expression from test or ast.AST
node.
Arguments
node
- Text or AST node.