MCPcopy Create free account
hub / github.com/EntilZha/PyFunctional / distinct

Method distinct

functional/pipeline.py:1319–1328  ·  view source on GitHub ↗

Returns sequence of distinct elements. Elements must be hashable. >>> seq([1, 1, 2, 3, 3, 3, 4]).distinct() [1, 2, 3, 4] :return: sequence of distinct elements

(self)

Source from the content-addressed store, hash-verified

1317 return reversed(self)
1318
1319 def distinct(self):
1320 """
1321 Returns sequence of distinct elements. Elements must be hashable.
1322
1323 >>> seq([1, 1, 2, 3, 3, 3, 4]).distinct()
1324 [1, 2, 3, 4]
1325
1326 :return: sequence of distinct elements
1327 """
1328 return self._transform(transformations.distinct_t())
1329
1330 def distinct_by(self, func):
1331 """

Callers 1

test_distinctMethod · 0.80

Calls 1

_transformMethod · 0.95

Tested by 1

test_distinctMethod · 0.64