File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,11 @@ class YamlAble(AbstractYamlAble):
5555 metaclass magic).
5656
5757 The behaviour is very similar though:
58- - fill the `__yaml_tag_suffix__` either directly or using the @yaml_info() decorator
58+ - fill the `__yaml_tag_suffix__` either directly or using the `@yaml_info()` decorator
59+ - optionally implement `__from_yaml_dict__` (class method called during decoding) and/or `__to_yaml_dict__`
60+ (instance method called during encoding) if you wish to have control on the process, for example to only dump part
61+ of the attributes or perform some custom instance creation. Note that default implementation relies on `vars(self)`
62+ for dumping and on `cls(**dct)` for loading.
5963 """
6064 __yaml_tag_suffix__ = None
6165 """ placeholder for a class-wide yaml tag. It will be prefixed with '!yamlable/', stored in `YAMLABLE_PREFIX` """
You can’t perform that action at this time.
0 commit comments