pytilities.overloading.parameter — Pytilities 1.2.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Pytilities 1.2.0 documentation »
- API documentation »
- pytilities »
- pytilities.overloading »

# pytilities.overloading.parameter

`pytilities.overloading.parameter.` `Param`

  alias of `Parameter`

class `pytilities.overloading.parameter.` `Parameter`(name, *args, **kwargs)

  A parameter of an operation.

  It can match arguments and provide default values for them.

  Note that an argument matches a parameter, if its matcher returns True on the argument value or the parameter has a default.

  `read_arg`(arg)

    Read/process the given arg.

    Parameters: | arg – the argument value to read
    Returns: | True if parameter matches arg
    Return type: | bool

  `read_kwargs`(kwargs)

    Look in a dict for a matching arg and process its value.

    Parameters: | kwargs – frozen dictionary of arguments
    Returns: | True if a matching argument was found in kwargs
    Return type: | bool

  `write`(kwargs)

    Adds the last read argument value to a dictionary.

    Parameters: | kwargs – the dictionary to add the last value and the parameter name to
    Preconditions : | the parameter matched on the last read

  `name`

### Navigation

- index
- modules |
- next |
- previous |
- Pytilities 1.2.0 documentation »
- API documentation »
- pytilities »
- pytilities.overloading »