This module provides a class that wraps data into a callable object.
livius.util.functor.Functor(data, transform=None)¶Creates a callable object from the given data. The data must be indexable by the arguments that are provided when calling the object.
| Parameters: |
|
|---|
__call__(*args)¶Index the stored data.
| Parameters: | args – One or more indices we want to access the data with. |
|---|
Note
The arguments when calling the object must be provided in order of indexing
__weakref__¶list of weak references to the object (if defined)