MCPcopy Index your code
hub / github.com/RustPython/RustPython / SeqSet

Class SeqSet

Lib/test/test_random.py:188–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186
187 def test_sample_on_seqsets(self):
188 class SeqSet(abc.Sequence, abc.Set):
189 def __init__(self, items):
190 self._items = items
191
192 def __len__(self):
193 return len(self._items)
194
195 def __getitem__(self, index):
196 return self._items[index]
197
198 population = SeqSet([2, 4, 1, 3])
199 with warnings.catch_warnings():

Callers 1

Calls

no outgoing calls

Tested by 1