Skip to content

Commit 15883dd

Browse files
committed
Update documentation to include function option for fill.
1 parent f1b14e8 commit 15883dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/delta.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ always_include_values : Boolean, default=False
6969
:ref:`always_include_values_label` is used to make sure the delta objects includes the values that were changed. Sometime Delta tries to be efficient not include the values when it can get away with it. By setting this parameter to True, you ensure that the Delta object will include the values.
7070

7171
fill : Any, default=No Fill
72-
:ref:`delta_fill` This is only relevant if `force` is set. This parameter only applies when force is set and trying to fill an existing array. If the index of the array being applied is larger than the length of the array this value will be used to fill empty spaces of the array to extend it in order to add the new value. If this parameter is not set, the items will get dropped and the array not extended.
72+
:ref:`delta_fill` This is only relevant if `force` is set. This parameter only applies when force is set and trying to fill an existing array. If the index of the array being applied is larger than the length of the array this value will be used to fill empty spaces of the array to extend it in order to add the new value. If this parameter is not set, the items will get dropped and the array not extended. If this parameter is set with a callable function, it will get called each time a fill item is needed. It will be provided with three arguments: first argument is the array being filled, second argument is the value that is being added to the array, the third argument is the path that is being added.
73+
Example function: `def fill(obj, value, path): return "Camry" if "car" in path else None`
7374

7475

7576
**Returns**

0 commit comments

Comments
 (0)