init_decorator()¶
- audobject.init_decorator(*, borrow=None, hide=None, resolvers=None)[source]¶
Decorator for
__init__function ofaudobject.Object.If your class expects an argument
awhich is passed on as an argument to a classCor to a dictionary with keya, and stored underself.b, you can borrow the argument frombby settingborrow = {'a': 'b'}. This will storeain the YAML representation, even though your class actually does not have a corresponding attributeself.a.Arguments listed in
hiddenare not serialized to YAML. Note that objects you borrow attributes from, are also treated as hidden arguments.If a dictionary of
audobject.ValueResolveris passed, matching attributes will be encoded / decoded using the accordingaudobject.ValueResolver.