Skip to content

Commit

Permalink
Correct example
Browse files Browse the repository at this point in the history
  • Loading branch information
kiendang committed Oct 14, 2023
1 parent 2f5e943 commit 2b34c9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/syft/src/syft/types/tupledict.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ class DictTuple(tuple[_VT, ...], Generic[_KT, _VT], metaclass=_Meta):
IMPLEMENTATION DETAILS
DictTuple[_KT, _VT] is essentially a tuple[_VT, ...] that maintains an immutable Mapping[_KT, int] internally.
DictTuple[_KT, _VT] is essentially a tuple[_VT, ...] that maintains an immutable Mapping[_KT, int]
from the key to the tuple index internally.
For example DictTuple({"x": 1, "y": 2}) is just a tuple (1, 2) with a {"x": 1, "y": 2} mapping.
For example DictTuple({"x": 12, "y": 34}) is just a tuple (12, 34) with a {"x": 0, "y": 1} mapping.
types.MappingProxyType is used for the mapping for immutability.
"""
Expand Down

0 comments on commit 2b34c9e

Please sign in to comment.