euporie.core.convert.registry
Contain main format conversion function.
Functions
|
Typed version of namedtuple. |
|
Find and cache conversion routes. |
|
Add a converter to the centralized format conversion system. |
|
Accept both booleans and Filters as input and turn it into a Filter. |
Classes
|
Hold a conversion function and its weight. |
|
Fast, lightweight cache which keeps at most size items. |
|
Very simple cache that discards the oldest item when the cache size is exceeded. |
- class euporie.core.convert.registry.Converter(func: Callable, filter_: Filter, weight: int = 1)
Bases:
NamedTuple
Hold a conversion function and its weight.
- count(value, /)
Return number of occurrences of value.
- func: Callable
Alias for field number 0
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.