MCPcopy Index your code
hub / github.com/python/cpython / SeqSet

Class SeqSet

Lib/test/test_random.py:190–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…