Skip to content

Commit 06d806a

Browse files
committed
adding comment
1 parent 786d629 commit 06d806a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

bbot/core/helpers/web/envelopes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,11 @@ def pack_value(self, value, key=None):
188188
if key is None:
189189
raise ValueError("No subparam selected for non-singleton envelope")
190190
data = copy.deepcopy(inner)
191+
# In the loop: Traverse all the way down to the parent of the target value (all segments except the last),
191192
target = data
192193
for segment in key[:-1]:
193194
target = target[segment]
195+
# Use the final segment to actually assign the value.
194196
target[key[-1]] = value
195197
return self._pack(data)
196198

0 commit comments

Comments
 (0)