![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|
Public Member Functions | |
| __init__ (self, converter, *takes_self=False, takes_field=False) | |
| __getstate__ (self) | |
| __setstate__ (self, state) | |
Public Attributes | |
| converter | |
| takes_self | |
| takes_field | |
Protected Member Functions | |
| str | _fmt_converter_call (self, str attr_name, str value_var) |
Static Protected Member Functions | |
| str | _get_global_name (str attr_name) |
Protected Attributes | |
| _first_param_type | |
Stores a converter callable.
Allows for the wrapped converter to take additional arguments. The
arguments are passed in the order they are documented.
Args:
converter (Callable): A callable that converts the passed value.
takes_self (bool):
Pass the partially initialized instance that is being initialized
as a positional argument. (default: `False`)
takes_field (bool):
Pass the field definition (an :class:`Attribute`) into the
converter as a positional argument. (default: `False`)
.. versionadded:: 24.1.0
| attr._make.Converter.__getstate__ | ( | self | ) |
Return a dict containing only converter and takes_self -- the rest gets computed when loading.
| attr._make.Converter.__setstate__ | ( | self, | |
| state | |||
| ) |
Load instance from state.
|
protected |
Return a string that calls the converter for an attribute name *attr_name* and the value in variable named *value_var* according to `self.takes_self` and `self.takes_field`.
|
staticprotected |
Return the name that a converter for an attribute name *attr_name* would have.