Set
Bases:
Set represent an in- memory unordered collection of unique elements.
Implements the Collection Protocol from collections.abc, so it can be used as a standard immutable collection.
The underlying data structure is a frozenset.
Tip
Set(frozenset)is a no-copy operation since Python optimizes this under the hood.- If you have an existing
set, prefer usingSetMut.from_ref()to avoid unnecessary copying.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
|
The data to initialize the Set with. |
required |
Source code in src/pyochain/_iter.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |