提交 82b722cb 编写于 作者: HansBug's avatar HansBug 😆

dev(hansbug): update plenty of docs for TreeValue class

上级 6a5b4dd8
......@@ -6,7 +6,7 @@ treevalue.tree.common
.. _apidoc_tree_common_treestorage:
TreeStorage
-----------
-------------
.. autoclass:: TreeStorage
:members: get, get_or_default, pop, pop_or_default, popitem, set, setdefault, del_, contains, size, empty, copy, deepcopy, deepcopyx, dump, deepdump, deepdumpx, jsondumpx, copy_from, deepcopy_from, deepcopyx_from, detach, clear, iter_keys, iter_rev_keys, iter_values, iter_rev_values, iter_items, iter_rev_items
......@@ -16,6 +16,14 @@ TreeStorage
because adding method signatures will significantly decrease running speed.
.. _apidoc_tree_common_create_storage:
create_storage
-------------------
.. autofunction:: create_storage
.. _apidoc_tree_common_raw:
raw
......
......@@ -9,7 +9,7 @@ TreeValue
---------------
.. autoclass:: TreeValue
:members: __init__, __getattribute__, __setattr__, __delattr__, __contains__, __repr__, __iter__, __hash__, __eq__, _attr_extern, __len__, __bool__, __str__, __getstate__, __setstate__, get, pop, keys, values, items, __getitem__, __setitem__, __delitem__, _getitem_extern, _setitem_extern, _delitem_extern, popitem, clear, update, setdefault, __reversed__
:members: __init__, __getattribute__, __setattr__, __delattr__, __contains__, __repr__, __iter__, __hash__, __eq__, _attr_extern, __len__, __bool__, __str__, __getstate__, __setstate__, get, pop, keys, values, items, __getitem__, __setitem__, __delitem__, _getitem_extern, _setitem_extern, _delitem_extern, popitem, clear, update, setdefault, __reversed__, _detach
.. _apidoc_tree_tree_delayed:
......
......@@ -221,7 +221,7 @@ def general_tree_value(base: Optional[Mapping[str, Any]] = None,
- iter: Iterator to walk the given tree, contains 2 items, the 1st one is the full \
path of the node, the 2nd one is the value.
Examples::
Examples:
>>> from treevalue import FastTreeValue, walk
>>> tv1 = FastTreeValue({'a': 1, 'b': 2, 'c': {'x': 2, 'y': 2}})
>>> for k, v in tv1.walk():
......
......@@ -119,7 +119,7 @@ cpdef walk(TreeValue tree):
- iter: Iterator to walk the given tree, contains 2 items, the 1st one is the full \
path of the node, the 2nd one is the value.
Examples::
Examples:
>>> from treevalue import TreeValue, walk
>>> tv1 = TreeValue({'a': 1, 'b': 2, 'c': {'x': 2, 'y': 2}})
>>> for k, v in walk(tv1):
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册